com.objsys.asn1j.runtime
Interface Asn1TypeIF

All Known Implementing Classes:
Asn1_ABSTRACT_SYNTAX_property, Asn18BitCharString, Asn1ArrayType, Asn1Base64BinaryString, Asn1BigDecimal, Asn1BigInteger, Asn1BitString, Asn1BMPString, Asn1Boolean, Asn1CHARACTER_STRING, Asn1CHARACTER_STRING_identification, Asn1CHARACTER_STRING_identification_context_negotiation, Asn1CHARACTER_STRING_identification_syntaxes, Asn1CharString, Asn1Choice, Asn1ChoiceExt, Asn1Date, Asn1DateTime, Asn1Duration, Asn1EmbeddedPDV, Asn1EmbeddedPDV_identification, Asn1EmbeddedPDV_identification_context_negotiation, Asn1EmbeddedPDV_identification_syntaxes, Asn1Enumerated, Asn1External, Asn1External_encoding, Asn1GeneralizedTime, Asn1GeneralString, Asn1GraphicString, Asn1IA5String, Asn1Integer, Asn1Null, Asn1NumericString, Asn1ObjectDescriptor, Asn1ObjectIdentifier, Asn1OctetString, Asn1OID_IRI, Asn1OpenExt, Asn1OpenType, Asn1PrintableString, Asn1Real, Asn1Real10, Asn1RELATIVE_OID_IRI, Asn1RelativeOID, Asn1T61String, Asn1Time, Asn1TimeOfDay, Asn1Type, Asn1UniversalString, Asn1UTCTime, Asn1UTF8String, Asn1VarWidthCharString, Asn1VideotexString, Asn1VisibleString, Asn1X694OrderElement, Asn1Xer__ABSTRACT_SYNTAX_property_default_Type, Asn1XerCHARACTER_STRING, Asn1XerCHARACTER_STRING_identification, Asn1XerCHARACTER_STRING_identification_context_negotiation, Asn1XerCHARACTER_STRING_identification_syntaxes, Asn1XerEmbeddedPDV, Asn1XerEmbeddedPDV_identification, Asn1XerEmbeddedPDV_identification_context_negotiation, Asn1XerEmbeddedPDV_identification_syntaxes, Asn1XerExternal, Asn1XerExternal_encoding, Asn1XerOpenType, Asn1Xml__ABSTRACT_SYNTAX_property_default_Type, Asn1XmlAnyElem, Asn1XmlCHARACTER_STRING, Asn1XmlCHARACTER_STRING_identification, Asn1XmlCHARACTER_STRING_identification_context_negotiation, Asn1XmlCHARACTER_STRING_identification_syntaxes, Asn1XmlEmbeddedPDV, Asn1XmlEmbeddedPDV_identification, Asn1XmlEmbeddedPDV_identification_context_negotiation, Asn1XmlEmbeddedPDV_identification_syntaxes, Asn1XmlExternal, Asn1XmlExternal_encoding

public interface Asn1TypeIF

This is the base interface for all ASN.1 built-in types.


Method Summary
 void decode(Asn1BerDecodeBuffer buffer, boolean explicit, int implicitLength)
          This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) decode method.
 void decode(Asn1PerDecodeBuffer buffer)
          This method declaration is the signature of the standard Packed Encoding Rules (PER) decode method.
 void decode(java.lang.Object reader, java.io.InputStream byteStream)
          This method declaration is the signature of the standard XML Encoding Rules (XER) decode method.
 void decode(java.lang.Object reader, java.lang.String xmlURI)
          This method declaration is the signature of the standard XML Encoding Rules (XER) decode method.
 void decodeXML(java.lang.String buffer, java.lang.String attrs)
          This method decodes the XML content of a simple type.
 int encode(Asn1BerEncodeBuffer buffer, boolean explicit)
          This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) encode method.
 void encode(Asn1BerOutputStream out, boolean explicit)
          This method declaration is the signature of the streaming oriented BER encode method.
 void encode(Asn1PerEncodeBuffer buffer)
          This method declaration is the signature of the standard Packed Encoding Rules (PER) encode method.
 void encode(Asn1PerOutputStream out)
          This method declaration is the signature of the streaming oriented PER encode method.
 void encode(Asn1XerEncoder buffer)
          This method declaration is the signature of the standard XML Encoding Rules (XER) encode method.
 void encode(Asn1XerEncoder buffer, java.lang.String elemName)
          This method declaration is the signature of the standard XML Encoding Rules (XER) encode method.
 boolean isOpenType()
          Returns open type mode for XML encoding/decoding.
 void print(java.io.PrintStream out, java.lang.String varName, int level)
          This method declaration is the signature of the standard print method used to print the contents of the object representing the ASN.1 type.
 void setOpenType()
          Sets open type mode for XML encoding/decoding.
 

Method Detail

decode

void decode(Asn1BerDecodeBuffer buffer,
            boolean explicit,
            int implicitLength)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) decode method.

Parameters:
buffer - Decode message buffer object
explicit - Flag indicating explicit tag should be parsed from the encoded type.
implicitLength - Length of the contents field (only required if explicit is false).
Throws:
Asn1Exception
java.io.IOException

encode

int encode(Asn1BerEncodeBuffer buffer,
           boolean explicit)
           throws Asn1Exception
This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) encode method.

Parameters:
buffer - Encode message buffer object
explicit - Flag indicating explicit tag should be added to the encoded type.
Returns:
Decoded integer value
Throws:
Asn1Exception

decode

void decode(Asn1PerDecodeBuffer buffer)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard Packed Encoding Rules (PER) decode method.

Parameters:
buffer - PER Encode message buffer object
Throws:
Asn1Exception
java.io.IOException

encode

void encode(Asn1PerEncodeBuffer buffer)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard Packed Encoding Rules (PER) encode method.

Parameters:
buffer - PER Encode message buffer object
Throws:
Asn1Exception
java.io.IOException

encode

void encode(Asn1XerEncoder buffer)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard XML Encoding Rules (XER) encode method. This method invokes the generated method with element name set to null. This will cause the ASN.1 type name to be used as the top-level element name.

Parameters:
buffer - XER Encode message buffer object
Throws:
java.io.IOException - Any exception thrown by the underlying stream.
Asn1Exception - Thrown, if operation is failed.

encode

void encode(Asn1XerEncoder buffer,
            java.lang.String elemName)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard XML Encoding Rules (XER) encode method.

Parameters:
buffer - XER Encode message buffer object
elemName - XML element name of item
Throws:
java.io.IOException - Any exception thrown by the underlying stream.
Asn1Exception - Thrown, if operation is failed.

decode

void decode(java.lang.Object reader,
            java.lang.String xmlURI)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard XML Encoding Rules (XER) decode method.

Parameters:
reader - XML reader object
xmlURI - URI of a source
Throws:
java.io.IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
Asn1Exception - Thrown, if operation is failed.

decode

void decode(java.lang.Object reader,
            java.io.InputStream byteStream)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the standard XML Encoding Rules (XER) decode method.

Parameters:
reader - XML reader object
byteStream - Input byte stream object
Throws:
java.io.IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
Asn1Exception - Thrown, if operation is failed.

decodeXML

void decodeXML(java.lang.String buffer,
               java.lang.String attrs)
               throws Asn1Exception
This method decodes the XML content of a simple type.

Parameters:
buffer - String containing data to be decoded
attrs - Attributes string from element tag
Throws:
Asn1Exception

setOpenType

void setOpenType()
Sets open type mode for XML encoding/decoding.


isOpenType

boolean isOpenType()
Returns open type mode for XML encoding/decoding.

Returns:
true if open type mode is on.

encode

void encode(Asn1BerOutputStream out,
            boolean explicit)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the streaming oriented BER encode method.

Parameters:
out - BER Output Stream object
explicit - Flag indicating explicit tagging should be done
Throws:
java.io.IOException - Any exception thrown by the underlying OutputStream.
Asn1Exception - Thrown, if operation is failed.

encode

void encode(Asn1PerOutputStream out)
            throws Asn1Exception,
                   java.io.IOException
This method declaration is the signature of the streaming oriented PER encode method.

Parameters:
out - BER Output Stream object
Throws:
java.io.IOException - Any exception thrown by the Asn1PerOutputStream.
Asn1Exception - Thrown, if operation is failed.

print

void print(java.io.PrintStream out,
           java.lang.String varName,
           int level)
This method declaration is the signature of the standard print method used to print the contents of the object representing the ASN.1 type.

Parameters:
out - Output print stream
varName - Name of the variable being printed
level - Indentation level