public static class SET.Template extends java.lang.Object implements ASN1Template
Modifier and Type | Class and Description |
---|---|
static class |
SET.Template.Element
An element of a SET template.
|
Constructor and Description |
---|
Template() |
Modifier and Type | Method and Description |
---|---|
void |
addElement(ASN1Template t)
Adds a sub-template to the end of this SET template.
|
void |
addElement(ASN1Template t,
ASN1Value def)
Adds a sub-template with the given default value to the end
of this SET template.
|
void |
addElement(Tag implicit,
ASN1Template t)
Adds a sub-template with the given implicit tag to the end of this
SET template.
|
void |
addElement(Tag implicit,
ASN1Template t,
ASN1Value def)
Adds a sub-template with the given default value and implicit tag to
the end of this SET template.
|
void |
addOptionalElement(ASN1Template t)
Adds an optional sub-template to the end
of this SET template.
|
void |
addOptionalElement(Tag implicit,
ASN1Template t)
Adds an optional sub-template with the given implicit tag to the end
of this SET template.
|
ASN1Value |
decode(java.io.InputStream istream)
Decodes the input stream into a SET value.
|
ASN1Value |
decode(Tag tag,
java.io.InputStream istream)
Decodes the input stream into a SET value with the given implicit
tag.
|
ASN1Value |
defaultAt(int index)
Returns the default value for the sub-template at the given index.
|
Tag |
implicitTagAt(int index)
Returns the implicit tag of the item stored at the given index.
|
void |
insertElementAt(ASN1Template t,
ASN1Value def,
int index)
Inserts the template with the given default
value at the given index.
|
void |
insertElementAt(ASN1Template t,
int index)
Inserts the template at the given index.
|
void |
insertElementAt(Tag implicit,
ASN1Template t,
ASN1Value def,
int index)
Inserts the template with the given implicit tag and given default
value at the given index.
|
void |
insertElementAt(Tag implicit,
ASN1Template t,
int index)
Inserts the template with the given implicit tag at the given index.
|
void |
insertOptionalElementAt(ASN1Template t,
int index)
Inserts the optional template at the given index.
|
void |
insertOptionalElementAt(Tag implicit,
ASN1Template t,
int index)
Inserts the optional template with the given default
value at the given index.
|
boolean |
isOptionalAt(int index)
Returns
true if the sub-template at the given index
is optional. |
void |
removeAllElements() |
void |
removeElementAt(int index) |
int |
size() |
boolean |
tagMatch(Tag tag)
Determines whether the given tag satisfies this template.
|
ASN1Template |
templateAt(int index)
Returns the sub-template stored at the given index.
|
public void addElement(ASN1Template t)
MySet ::= SET { item SubType, ... }the "item" element would be added to the MySet template with:
mySet.addElement( new SubType.Template() );
t
- Sub-template.public void insertElementAt(ASN1Template t, int index)
t
- Sub-template.index
- Index.public void addElement(Tag implicit, ASN1Template t)
MySet ::= SET { item [0] IMPLICIT SubType, ... }the "item" element would be added to the MySet template with:
mySet.addElement( new Tag(0), new SubType.Template() );
implicit
- Implicit tag.t
- Sub-template.public void insertElementAt(Tag implicit, ASN1Template t, int index)
implicit
- Implicit tag.t
- Sub-template.index
- Index.public void addOptionalElement(ASN1Template t)
MySet ::= SET { item SubType OPTIONAL, ... }the "item" element would be added to the MySet template with:
mySet.addOptionalElement( new SubType.Template() );
t
- Optional sub-template.public void insertOptionalElementAt(ASN1Template t, int index)
t
- Optional sub-template.index
- Index.public void addOptionalElement(Tag implicit, ASN1Template t)
MySet ::= SET { item [0] IMPLICIT SubType OPTIONAL, ... }the "item" element would be added to the MySet template with:
mySet.addOptionalElement( new Tag(0), new SubType.Template() );
implicit
- Implicit tag.t
- Optional sub-template.public void insertOptionalElementAt(Tag implicit, ASN1Template t, int index)
implicit
- Implicit tag.t
- Optional sub-template.index
- Index.public void addElement(ASN1Template t, ASN1Value def)
MySet ::= SET { item INTEGER DEFAULT (5), ... }the "item" element would be added to the MySet template with:
mySet.addElement( new SubType.Template(), new INTEGER(5) );
t
- Sub-template.def
- Default value.public void insertElementAt(ASN1Template t, ASN1Value def, int index)
t
- Sub-template.def
- Default value.index
- Index.public void addElement(Tag implicit, ASN1Template t, ASN1Value def)
MySet ::= SET { item [0] IMPLICIT INTEGER DEFAULT (5), ... }the "item" element would be added to the MySet template with:
mySet.addElement( new Tag(0), new SubType.Template(), new INTEGER(5) );
implicit
- Implicit tag.t
- Sub-template.def
- Default value.public void insertElementAt(Tag implicit, ASN1Template t, ASN1Value def, int index)
implicit
- Implicit tag.t
- Sub-template.def
- Default value.index
- Index.public Tag implicitTagAt(int index)
index
- Index.public ASN1Template templateAt(int index)
index
- Index.public boolean isOptionalAt(int index)
true
if the sub-template at the given index
is optional.index
- Index.public ASN1Value defaultAt(int index)
index
- Index.public int size()
public void removeAllElements()
public void removeElementAt(int index)
public boolean tagMatch(Tag tag)
tagMatch
in interface ASN1Template
tag
- Tag.public ASN1Value decode(java.io.InputStream istream) throws java.io.IOException, InvalidBERException
decode
in interface ASN1Template
istream
- Input stream.java.io.IOException
- If other error occurred.InvalidBERException
- If there is an invalid BER encoding.public ASN1Value decode(Tag tag, java.io.InputStream istream) throws java.io.IOException, InvalidBERException
decode
in interface ASN1Template
tag
- Implicit tag.istream
- Input stream.java.io.IOException
- If other error occurred.InvalidBERException
- If there is an invalid BER encoding.