public class SET extends java.lang.Object implements ASN1Value
Modifier and Type | Class and Description |
---|---|
static class |
SET.OF_Template
A Template for decoding SET OF values.
|
static class |
SET.Template
SET.Template
This class is used for decoding DER-encoded SETs.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
elements |
protected static Form |
FORM |
static Tag |
TAG |
Constructor and Description |
---|
SET() |
Modifier and Type | Method and Description |
---|---|
void |
addElement(ASN1Value v)
Adds an element to this SET.
|
void |
addElement(Tag implicitTag,
ASN1Value v)
Adds an element to this SET with the given implicit tag.
|
void |
BERencode(Tag implicitTag,
java.io.OutputStream ostream)
Encodes this SET without re-ordering it.
|
ASN1Value |
elementAt(int index)
Returns the element at the given index in the SET.
|
ASN1Value |
elementWithTag(Tag tag)
Returns the element with the given Tag, or null if no element exists
with the given tag.
|
void |
encode(java.io.OutputStream ostream)
Writes the DER encoding to the given output stream.
|
void |
encode(Tag implicitTag,
java.io.OutputStream ostream)
Writes the DER encoding to the given output stream,
using the given implicit tag.
|
Tag |
getTag()
Returns the base tag for this type, not counting any tags
that may be imposed on it by its context.
|
void |
insertElementAt(ASN1Value v,
int index)
Inserts an element at the given index.
|
void |
insertElementAt(Tag implicitTag,
ASN1Value v,
int index)
Inserts an element with the given implicit tag at the given index.
|
static void |
main(java.lang.String[] args) |
void |
removeAllElements()
Removes all elements from this SET.
|
void |
removeElementAt(int index)
Removes the element from the specified index.
|
int |
size()
Returns the number of elements in this SET.
|
Tag |
tagAt(int index)
Returns the tag of the element at the given index.
|
public static final Tag TAG
protected static final Form FORM
protected java.util.Vector elements
public Tag getTag()
ASN1Value
public void addElement(ASN1Value v)
public void addElement(Tag implicitTag, ASN1Value v)
MyType ::= SET { item [0] IMPLICIT INTEGER, ... }then the "item" element could be added (with a sample value of 45) to the SET with:
myTypeInstance.addElement( new Tag(0), new INTEGER(45) );
public void insertElementAt(ASN1Value v, int index)
public void insertElementAt(Tag implicitTag, ASN1Value v, int index)
public ASN1Value elementAt(int index)
public Tag tagAt(int index)
public ASN1Value elementWithTag(Tag tag)
public int size()
public void removeAllElements()
public void removeElementAt(int index)
public void encode(java.io.OutputStream ostream) throws java.io.IOException
public void encode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
public void BERencode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)