All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.asn1.SEQUENCE

java.lang.Object
   |
   +----iaik.asn1.ASN1Object
           |
           +----iaik.asn1.SEQUENCE

public class SEQUENCE
extends ASN1Object
This class implements the ASN.1 native type "SEQUENCE".


Variable Index

 o contentCount
The number of objects in the buffer.
 o contentData
The buffer where the contents are stored.

Constructor Index

 o SEQUENCE()
Create a new SEQUENCE.

Method Index

 o addComponent(ASN1Object)
Add a new component to the end of SEQUENCE.
 o addComponent(ASN1Object, int)
Add a new component to a given location within the SEQUENCE.
 o countComponents()
Returns the number of component objects.
 o decode(int, int, DerDecodeInputStream)
Decodes the next available data from the DerDecodeInputStream.
 o encode(DerEncodeOutputStream)
DER encodes this ASN1Object and write the result to the DerEncodeOutputStream.
 o getComponentAt(int)
Returns the component at the given location within a SEQUENCE.
 o getComponents()
Returns an Enumeration that iterates over the component objects.
 o getValue()
Returns the value of this SEQUENCE as an array of ASN1Objects.
 o init()
Initialize the object factory method.
 o removeComponent(ASN1Object)
Removes a component from a SEQUENCE.
 o removeComponent(int)
Removes a component at the given location within a SEQUENCE.
 o setComponent(int, ASN1Object)
Sets the component at the given location within a SEQUENCE.
 o setValue(Object)
Sets the value of this object to value.
 o toString()
Returns a String that represents the value of this Object.

Variables

 o contentData
 protected ASN1Object contentData[]
The buffer where the contents are stored.

 o contentCount
 protected int contentCount
The number of objects in the buffer.

Constructors

 o SEQUENCE
 public SEQUENCE()
Create a new SEQUENCE.

Methods

 o init
 protected static void init()
Initialize the object factory method.

 o getValue
 public Object getValue()
Returns the value of this SEQUENCE as an array of ASN1Objects.

Returns:
the components as ASN1Object[]
Overrides:
getValue in class ASN1Object
 o setValue
 public void setValue(Object object)
Sets the value of this object to value.

Parameters:
value - the value as ASN1Object[]
Overrides:
setValue in class ASN1Object
 o addComponent
 public void addComponent(ASN1Object component)
Add a new component to the end of SEQUENCE.

Parameters:
eter - component the component which should be added to the Sequence
 o addComponent
 public synchronized void addComponent(ASN1Object component,
                                       int index)
Add a new component to a given location within the SEQUENCE.

Parameters:
component - the component to insert
index - where to insert the new component
Throws: ArrayIndexOutOfBoundsException
If the index is invalid.
 o removeComponent
 public synchronized void removeComponent(ASN1Object component)
Removes a component from a SEQUENCE. If the component is not within the SEQUENCE, does nothing.

Parameters:
component - the component to remove
 o removeComponent
 public synchronized void removeComponent(int index)
Removes a component at the given location within a SEQUENCE.

Parameters:
index - where to remove the element from
Throws: ArrayIndexOutOfBoundsException
if the index is invalid.
 o getComponentAt
 public ASN1Object getComponentAt(int index)
Returns the component at the given location within a SEQUENCE.

Parameters:
index - the desired position
Returns:
the component
Throws: ArrayIndexOutOfBoundsException
if the index is invalid
Overrides:
getComponentAt in class ASN1Object
 o setComponent
 public void setComponent(int index,
                          ASN1Object value)
Sets the component at the given location within a SEQUENCE.

Parameters:
index - the location
value - the component
Throws: ArrayIndexOutOfBoundsException
if the index is invalid
 o countComponents
 public int countComponents()
Returns the number of component objects. Zero if none.

Returns:
number of components this SEQUENCE contains
Overrides:
countComponents in class ASN1Object
 o getComponents
 public synchronized Enumeration getComponents()
Returns an Enumeration that iterates over the component objects.

Returns:
an Enumeration of components in this SEQUENCE
 o encode
 protected void encode(DerEncodeOutputStream os)
DER encodes this ASN1Object and write the result to the DerEncodeOutputStream.

Parameters:
os - the output stream to which to write the data
Overrides:
encode in class ASN1Object
 o decode
 protected void decode(int tag,
                       int length,
                       DerDecodeInputStream is) throws CodingException, IOException
Decodes the next available data from the DerDecodeInputStream.

Parameters:
tag - the full tag of the current ASN1Object
length - the length of the ASN1Object which shall be decoded
Throws: IOException
if there is a problem with the DerDecodeInputStream
Throws: CodingException
if the bytes from is could not be decoded
Overrides:
decode in class ASN1Object
 o toString
 public String toString()
Returns a String that represents the value of this Object.

Returns:
the String representation
Overrides:
toString in class ASN1Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index