|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.objsys.asn1j.runtime.Asn1Type
com.objsys.asn1j.runtime.Asn1OctetString
com.objsys.asn1j.runtime.Asn1OpenType
public class Asn1OpenType
This is a container class for holding the an ASN.1 open type value.
Field Summary | |
---|---|
protected Asn1EncodeBuffer |
mEncodeBuffer
|
protected int |
mLength
|
protected boolean |
mTextEncoding
|
Fields inherited from class com.objsys.asn1j.runtime.Asn1OctetString |
---|
TAG, value |
Fields inherited from class com.objsys.asn1j.runtime.Asn1Type |
---|
BIT_STRING, BMPString, BOOLEAN, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OpenType, PrintableString, REAL, RelativeOID, SEQUENCE, SET, T61String, TeletexString, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString |
Constructor Summary | |
---|---|
Asn1OpenType()
This constructor creates an empty type that can be used in a decode method call to receive an encoded value. |
|
Asn1OpenType(Asn1EncodeBuffer buffer)
This constructor initializes an open type using an encoded component. |
|
Asn1OpenType(byte[] data)
This constructor initializes an open type from the given byte array. |
|
Asn1OpenType(byte[] data,
int offset,
int nbytes)
This constructor initializes the open type from a portion of the given byte array. |
|
Asn1OpenType(int length)
This constructor initializes an open type using just an encoded component length. |
Method Summary | |
---|---|
void |
decode(Asn1BerDecodeBuffer buffer,
boolean explicit,
int implicitLength)
This method decodes an ASN.1 open type value. |
int |
encode(Asn1BerEncodeBuffer buffer,
boolean explicit)
This method encodes an ASN.1 open type value. |
void |
encode(Asn1BerOutputStream out,
boolean explicit)
This method encodes and writes to the stream an ASN.1 open type value including the UNIVERSAL tag value and length if explicit tagging is specified. |
void |
encode(Asn1PerEncodeBuffer buffer)
This method encodes an ASN.1 open type 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). |
java.lang.String |
toString()
This method will return a string representation of the open type value. |
Methods inherited from class com.objsys.asn1j.runtime.Asn1OctetString |
---|
compareTo, decode, decode, decodeXER, decodeXML, encode, encode, encode, encode, encodeAttribute, equals, equals, getLength, toInputStream |
Methods inherited from class com.objsys.asn1j.runtime.Asn1Type |
---|
clone, decode, decode, decode, encode, encode, encode, getTypeName, indent, isOpenType, matchTag, matchTag, pdiag, print, setKey, setOpenType |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient int mLength
protected transient Asn1EncodeBuffer mEncodeBuffer
protected transient boolean mTextEncoding
Constructor Detail |
---|
public Asn1OpenType()
public Asn1OpenType(byte[] data)
data
- Byte array containing a previously encoded
message component.public Asn1OpenType(byte[] data, int offset, int nbytes)
data
- Byte array containing an octet string
in binary form.offset
- Starting offset in data from which to copy bytesnbytes
- Number of bytes to copy from target arraypublic Asn1OpenType(Asn1EncodeBuffer buffer)
buffer
- Reference to encode buffer into which
component type was encoded.public Asn1OpenType(int length)
length
- Length of the pre-encoded component. This must
be the last item in the type and already exist
in the encode buffer.Method Detail |
---|
public void decode(Asn1BerDecodeBuffer buffer, boolean explicit, int implicitLength) throws Asn1Exception, java.io.IOException
decode
in interface Asn1TypeIF
decode
in class Asn1OctetString
buffer
- Decode message buffer objectexplicit
- Flag indicating element is explicitly taggedimplicitLength
- Length of contents if implicit
Asn1Exception
java.io.IOException
public int encode(Asn1BerEncodeBuffer buffer, boolean explicit) throws Asn1Exception
encode
in interface Asn1TypeIF
encode
in class Asn1OctetString
buffer
- Encode message buffer objectexplicit
- Flag indicating element is explicitly tagged
Asn1Exception
public void encode(Asn1PerEncodeBuffer buffer) throws Asn1Exception, java.io.IOException
encode
in interface Asn1TypeIF
encode
in class Asn1OctetString
buffer
- Encode message buffer object
Asn1Exception
java.io.IOException
public java.lang.String toString()
toString
in class Asn1OctetString
public void encode(Asn1BerOutputStream out, boolean explicit) throws Asn1Exception, java.io.IOException
encode
in interface Asn1TypeIF
encode
in class Asn1OctetString
out
- BER Output Stream objectexplicit
- Flag indicating explicit tagging should be done
java.io.IOException
- Any exception thrown by the underlying OutputStream.
Asn1Exception
- Thrown, if operation is failed.public void encode(Asn1PerOutputStream out) throws Asn1Exception, java.io.IOException
encode
in interface Asn1TypeIF
encode
in class Asn1OctetString
out
- PER Output Stream object
java.io.IOException
- Any exception thrown by the Asn1PerOutputStream.
Asn1Exception
- Thrown, if operation is failed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |