com.objsys.asn1j.runtime
Class Asn1ChoiceExt

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1Type
      extended by com.objsys.asn1j.runtime.Asn1OctetString
          extended by com.objsys.asn1j.runtime.Asn1OpenType
              extended by com.objsys.asn1j.runtime.Asn1ChoiceExt
All Implemented Interfaces:
Asn1TypeIF, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class Asn1ChoiceExt
extends Asn1OpenType

This is a container class for holding a CHOICE open type extension element. This class is used for an open type extension (i.e. a ... at the end of a constructed type or a ..., ... at some other point in a constructed type).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.objsys.asn1j.runtime.Asn1OpenType
Asn1OpenType.SaxHandler
 
Field Summary
 short choiceIndex
          The choice index value is used with the packed encoding rules (PER) when this object is used to encode/decode a choice extension.
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1OpenType
BER, dataEncoding, EDATAMSG, JSON, mEncodeBuffer, mLength, PER, UNKNOWN, XER
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1OctetString
TAG, value
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1Type
BIT_STRING, BMPString, BOOLEAN, DATE, DATE_TIME, DURATION, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, mAsn1TypeName, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OID_IRI, OpenType, PrintableString, REAL, RELATIVE_OID_IRI, RelativeOID, SEQUENCE, SET, T61String, TeletexString, TIME, TIME_OF_DAY, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString
 
Constructor Summary
Asn1ChoiceExt()
           
 
Method Summary
 void decode(Asn1BerDecodeBuffer buffer, boolean explicit, int implicitLength)
          This method decodes an extension field using the Basic Encoding Rules (BER).
 void decode(Asn1PerDecodeBuffer buffer)
          This method decodes an open type extension in a CHOICE construct using the packed encoding rules (PER).
 int encode(Asn1BerEncodeBuffer buffer, boolean explicit)
          This method encodes an ASN.1 open type extension value using the Basic Encoding Rules (BER).
 void encode(Asn1BerOutputStream out, boolean explicit)
          This method encodes an ASN.1 open type extension value using the Basic Encoding Rules (BER).
 void encode(Asn1PerEncodeBuffer buffer)
          This method encodes an ASN.1 open type extension value using the Packed Encoding Rules (PER).
 void encode(Asn1PerOutputStream out)
          This method encodes an ASN.1 open type value using the Packed Encoding Rules (PER).
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1OpenType
decode, decodeExtension, encode, encode, encode, encode, encode, encodeAsExtension, encodeAsExtension, encodeAsExtension, getAsn1TypeName, getCharData, getDataEncoding, getSaxHandler, getSaxHandler, setBinaryData, setCharData, setCharData, toString
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1OctetString
compareTo, decode, decode, decode, decodeXER, decodeXML, encode, encode, encode, encode, encode, encodeAttribute, encodeBase64Binary, equals, equals, getLength, getMderLength, hashCode, toInputStream
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1Type
clone, decode, decode, decode, decode, decode, encode, equals, getTypeName, indent, isOpenType, matchTag, matchTag, pdiag, print, setKey, setOpenType
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

choiceIndex

public short choiceIndex
The choice index value is used with the packed encoding rules (PER) when this object is used to encode/decode a choice extension.

Constructor Detail

Asn1ChoiceExt

public Asn1ChoiceExt()
Method Detail

decode

public void decode(Asn1BerDecodeBuffer buffer,
                   boolean explicit,
                   int implicitLength)
            throws Asn1Exception,
                   java.io.IOException
This method decodes an extension field using the Basic Encoding Rules (BER).

Specified by:
decode in interface Asn1TypeIF
Overrides:
decode in class Asn1OpenType
Parameters:
buffer - Decode message buffer object
explicit - Flag indicating element is explicitly tagged
implicitLength - Length of contents if implicit
Throws:
Asn1Exception
java.io.IOException

encode

public int encode(Asn1BerEncodeBuffer buffer,
                  boolean explicit)
           throws Asn1Exception
This method encodes an ASN.1 open type extension value using the Basic Encoding Rules (BER).

Specified by:
encode in interface Asn1TypeIF
Overrides:
encode in class Asn1OpenType
Parameters:
buffer - Encode message buffer object
explicit - Flag indicating element is explicitly tagged
Returns:
Length of encoded component
Throws:
Asn1Exception

decode

public void decode(Asn1PerDecodeBuffer buffer)
            throws Asn1Exception,
                   java.io.IOException
This method decodes an open type extension in a CHOICE construct using the packed encoding rules (PER). This method will capture the extension item in an open type object and store it in the value public member list variable. The public member variable choiceIndex will be populated with the decoded choice index value.

Specified by:
decode in interface Asn1TypeIF
Overrides:
decode in class Asn1OpenType
Parameters:
buffer - Decode message buffer object
Throws:
Asn1Exception
java.io.IOException

encode

public void encode(Asn1PerEncodeBuffer buffer)
            throws Asn1Exception,
                   java.io.IOException
This method encodes an ASN.1 open type extension value using the Packed Encoding Rules (PER).

Specified by:
encode in interface Asn1TypeIF
Overrides:
encode in class Asn1OpenType
Parameters:
buffer - Encode message buffer object
Throws:
Asn1Exception
java.io.IOException

encode

public void encode(Asn1BerOutputStream out,
                   boolean explicit)
            throws Asn1Exception,
                   java.io.IOException
This method encodes an ASN.1 open type extension value using the Basic Encoding Rules (BER).

Specified by:
encode in interface Asn1TypeIF
Overrides:
encode in class Asn1OpenType
Parameters:
out - BER Output Stream object
explicit - Flag indicating element is explicitly tagged
Throws:
Asn1Exception - Thrown, if operation is failed.
java.io.IOException - Any exception thrown by the underlying OutputStream.

encode

public void encode(Asn1PerOutputStream out)
            throws Asn1Exception,
                   java.io.IOException
This method encodes an ASN.1 open type value using the Packed Encoding Rules (PER).

Specified by:
encode in interface Asn1TypeIF
Overrides:
encode in class Asn1OpenType
Parameters:
out - PER Output Stream object
Throws:
Asn1Exception - Thrown, if operation is failed.
java.io.IOException - Any exception thrown by the Asn1PerOutputStream.