|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.jss.asn1.CHOICE
public class CHOICE
Objects of this class are generated by CHOICE.Template.decode(). It is not necessary to use them to encode a CHOICE. Since the encoding of a CHOICE is simply the encoding of the chosen element, it is easier to just write out the chosen element.
Nested Class Summary | |
---|---|
static class |
CHOICE.Template
A Template for decoding ASN.1 CHOICE s |
Constructor Summary | |
---|---|
CHOICE(ASN1Value val)
Create a CHOICE whose chosen element has no implicit tag. |
|
CHOICE(Tag implicitTag,
ASN1Value val)
Create a CHOICE whose chosen element has an implicit tag. |
Method Summary | |
---|---|
void |
encode(java.io.OutputStream ostream)
Encodes this CHOICE. |
void |
encode(Tag implicitTag,
java.io.OutputStream ostream)
Encodes this CHOICE. |
Tag |
getTag()
Returns the tag that the chosen element is encoded with, which is either the underlying tag of the element or an implicit tag. |
static CHOICE.Template |
getTemplate()
|
ASN1Value |
getValue()
Returns the chosen value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CHOICE(Tag implicitTag, ASN1Value val)
public CHOICE(ASN1Value val)
Method Detail |
---|
public Tag getTag()
getTag
in interface ASN1Value
public ASN1Value getValue()
public static CHOICE.Template getTemplate()
public void encode(java.io.OutputStream ostream) throws java.io.IOException
encode
in interface ASN1Value
java.io.IOException
public void encode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
encode
in interface ASN1Value
implicitTag
- This value is ignored. The tag of a CHOICE
is merely the tag of the chosen element of the CHOICE. A
CHOICE cannot itself have an implicit tag.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |