XCMS Toolkit

schemajic.schema
Class TagList

java.lang.Object
  extended by schemajic.schema.TagList

public class TagList
extends java.lang.Object

Processes and manipulates lists of ASN.1 tags.

Version:
1.00 - 2006/01/21
Author:
support@phillipgriffin.com

Field Summary
static java.lang.String EMPTY
           
 
Constructor Summary
TagList(java.lang.String s)
          Parse a list of ASN.1 tags.
TagList(Tag[] tags)
          Constructor for TagList with a list of ASN.1 tags parameter.
 
Method Summary
 Tag getLastTag()
          Gets a list of ASN.1 tags, possibly empty.
 java.util.Iterator getReverseTags()
          Optimization.
 java.util.Iterator getTags()
          Optimization.
 boolean isConstructed()
          Determines whether an ASN.1 tag is contructed (not primitive).
 boolean isContextSpecific()
          Determines whether a tag is not primitive, but a context specific tag.
 boolean isEmpty()
          Determines whether or not a list of ASN.1 tags is empty.
 boolean isPrimitive()
          Determines whether or not an ASN.1 tag is primitive (not constructed).
 boolean matches(java.io.InputStream in)
          Match each tag in this list against the data in the input stream and return true if all of the tags were found in the stream.
 java.lang.String toString()
          Determines whether or not a string has any content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final java.lang.String EMPTY
See Also:
Constant Field Values
Constructor Detail

TagList

public TagList(java.lang.String s)
        throws java.text.ParseException
Parse a list of ASN.1 tags.

Parameters:
s - a string of ASN.1 tags
Throws:
java.text.ParseException

TagList

public TagList(Tag[] tags)
Constructor for TagList with a list of ASN.1 tags parameter.

Parameters:
tags - a list of ASN.1 tags
Method Detail

getTags

public java.util.Iterator getTags()
Optimization. Store tags as a List or write an array iterator.

Returns:
an array of tags and array iterator

getLastTag

public Tag getLastTag()
Gets a list of ASN.1 tags, possibly empty.

Returns:
a list of ASN.1 tags or null

matches

public boolean matches(java.io.InputStream in)
                throws java.io.IOException
Match each tag in this list against the data in the input stream and return true if all of the tags were found in the stream.

Parameters:
in - the input stream of data
Returns:
boolen true or false
Throws:
java.io.IOException

isContextSpecific

public boolean isContextSpecific()
Determines whether a tag is not primitive, but a context specific tag.

Returns:
boolean true or false

isPrimitive

public boolean isPrimitive()
Determines whether or not an ASN.1 tag is primitive (not constructed).

Returns:
boolen true or false

isConstructed

public boolean isConstructed()
Determines whether an ASN.1 tag is contructed (not primitive).

Returns:
boolen true or false

isEmpty

public boolean isEmpty()
Determines whether or not a list of ASN.1 tags is empty.

Returns:
boolen true or false

toString

public java.lang.String toString()
Determines whether or not a string has any content.

Overrides:
toString in class java.lang.Object
Returns:
the current string value if it is not null, otherwise return the "?" character.

getReverseTags

public java.util.Iterator getReverseTags()
Optimization. Maintain ASN.1 tags in reverse order and simply return.

Returns:
a tags iterator

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.