All Packages Class Hierarchy This Package Previous Next Index
Class iaik.asn1.SET
java.lang.Object
|
+----iaik.asn1.ASN1Object
|
+----iaik.asn1.SET
- public class SET
- extends ASN1Object
This class implements the ASN.1 native type "SET".
-
contentCount
- The number of objects in the buffer.
-
contentData
- The buffer where the contents are stored.
-
SET()
- Create a new SET.
-
addComponent(ASN1Object)
- Add a new component to the end of the SET.
-
addComponent(ASN1Object, int)
- Add a new component to a given location within the SET.
-
countComponents()
- Returns the number of ASN1Objects.
-
decode(int, int, DerDecodeInputStream)
- Decodes the next available data from the DerDecodeInputStream.
-
encode(DerEncodeOutputStream)
- DER encodes this ASN1Object and write the result to the DerEncodeOutputStream.
-
getComponentAt(int)
- Returns the component at the given location within a SET.
-
getComponents()
- Returns an Enumeration that iterates over the component objects.
-
getValue()
- Returns the value of this SET as an array of ASN1Objects.
-
init()
- Initialize the object factory method.
-
removeComponent(ASN1Object)
- Removes a component from a SET.
-
removeComponent(int)
- Removes a component at the given location within a SET.
-
setComponent(int, ASN1Object)
- Sets the component at the given location within a SET.
-
setValue(Object)
- Sets the value of this object to value.
-
toString()
- Returns a String that represents the value of this Object.
contentData
protected ASN1Object contentData[]
- The buffer where the contents are stored.
contentCount
protected int contentCount
- The number of objects in the buffer.
SET
public SET()
- Create a new SET.
init
protected static void init()
- Initialize the object factory method.
getValue
public Object getValue()
- Returns the value of this SET as an array of ASN1Objects.
- Returns:
- the components as ASN1Object[]
- Overrides:
- getValue in class ASN1Object
setValue
public void setValue(Object value)
- Sets the value of this object to value.
- Parameters:
- value - the value as ASN1Object[]
- Overrides:
- setValue in class ASN1Object
addComponent
public void addComponent(ASN1Object component)
- Add a new component to the end of the SET.
- Parameters:
- eter - component the component which should be added to the SET
addComponent
public synchronized void addComponent(ASN1Object component,
int index)
- Add a new component to a given location within the SET.
- Parameters:
- component - the component to insert
- index - where to insert the new component
- Throws: ArrayIndexOutOfBoundsException
- If the index is invalid.
removeComponent
public synchronized void removeComponent(ASN1Object component)
- Removes a component from a SET. If the component
is not within the sequence, does nothing.
- Parameters:
- component - the component to remove
removeComponent
public synchronized void removeComponent(int index)
- Removes a component at the given location within a SET.
- Parameters:
- index - where to remove the element from
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
getComponentAt
public ASN1Object getComponentAt(int index)
- Returns the component at the given location within a SET.
- Parameters:
- index - the desired position
- Returns:
- the component
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
- Overrides:
- getComponentAt in class ASN1Object
setComponent
public void setComponent(int index,
ASN1Object value)
- Sets the component at the given location within a SET.
- Parameters:
- index - the location
- value - the component
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
countComponents
public int countComponents()
- Returns the number of ASN1Objects. Zero if none.
- Returns:
- number of components this SET contains
- Overrides:
- countComponents in class ASN1Object
getComponents
public synchronized Enumeration getComponents()
- Returns an Enumeration that iterates over the component objects.
- Returns:
- an Enumeration of components in this SET
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
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
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