This class is for the tagged object type. A nested tag is
allowed. A tagged element contains another BER element.
ANY
public static final int ANY
APPLICATION
public static final int APPLICATION
BITSTRING
public static final int BITSTRING
BOOLEAN
public static final int BOOLEAN
Possible element types.
CHOICE
public static final int CHOICE
CONSTRUCTED
public static final int CONSTRUCTED
CONTEXT
public static final int CONTEXT
ENUMERATED
public static final int ENUMERATED
EOC
public static final int EOC
Possible tags.
EXOP_REQ_OID
public static final int EXOP_REQ_OID
EXOP_REQ_VALUE
public static final int EXOP_REQ_VALUE
EXOP_RES_OID
public static final int EXOP_RES_OID
EXOP_RES_VALUE
public static final int EXOP_RES_VALUE
GENERALSTRING
public static final int GENERALSTRING
GRAPHICSTRING
public static final int GRAPHICSTRING
IA5STRING
public static final int IA5STRING
INTEGER
public static final int INTEGER
MRA_DNATTRS
public static final int MRA_DNATTRS
MRA_OID
public static final int MRA_OID
MRA_TYPE
public static final int MRA_TYPE
MRA_VALUE
public static final int MRA_VALUE
NULL
public static final int NULL
NUMERICSTRING
public static final int NUMERICSTRING
OBJECTID
public static final int OBJECTID
OCTETSTRING
public static final int OCTETSTRING
PRIMITIVE
public static final int PRIMITIVE
PRINTABLESTRING
public static final int PRINTABLESTRING
PRIVATE
public static final int PRIVATE
REAL
public static final int REAL
SASLCONTEXT
public static final int SASLCONTEXT
SEQUENCE
public static final int SEQUENCE
SET
public static final int SET
SK_MATCHRULE
public static final int SK_MATCHRULE
SK_REVERSE
public static final int SK_REVERSE
SR_ATTRTYPE
public static final int SR_ATTRTYPE
TAG
public static final int TAG
Internal (non-transmitted) tags.
TELETEXSTRING
public static final int TELETEXSTRING
UNIVERSAL
public static final int UNIVERSAL
UTCTIME
public static final int UTCTIME
VIDEOTEXSTRING
public static final int VIDEOTEXSTRING
VISIBLESTRING
public static final int VISIBLESTRING
byteToHexString
public String byteToHexString(byte value)
Converts byte to hex string.
- string representation of Hex String
getElement
public static BERElement getElement(BERTagDecoder decoder,
InputStream stream,
int[] bytes_read)
throws IOException
Gets a ber element from the input stream.
decoder
- decoder for application specific BERstream
- source of ber encodingbytes_read
- array of 1 int; value incremented by
number of bytes read from stream
getType
public abstract int getType()
Gets the element type.
readLengthOctets
public static int readLengthOctets(InputStream stream,
int[] bytes_read)
throws IOException
Reads and decodes a length byte and then that many octets
from the input stream.
stream
- input stream from which to readbytes_read
- array of 1 int; value incremented by
number of bytes read from stream
- length of contents or -1 if indefinite length.
readTwosComplement
protected int readTwosComplement(InputStream stream,
int[] bytes_read,
int length)
throws IOException
Reads the two's complement representation of an integer from
an input stream.
stream
- source of databytes_read
- number of bytes readlength
- number of bytes to be read
- the integer value as two's complement.
readUnsignedBinary
protected int readUnsignedBinary(InputStream stream,
int[] bytes_read,
int length)
throws IOException
Reads a number of bytes from an input stream and form
an integer..
stream
- source of databytes_read
- number of bytes readlength
- number of bytes to be read (1 to 4)
- the value of the data as two's complement.
sendDefiniteLength
public static void sendDefiniteLength(OutputStream stream,
int num_content_octets)
throws IOException
Writes length octets (definite length only) to stream.
Uses shortform whenever possible.
stream
- output stream to write tonum_content_octets
- value to be encode into length octets
toString
public abstract String toString()
Gets the string representation.
- string representation of an element.
write
public abstract void write(OutputStream stream)
throws IOException
Sends the BER encoding directly to a stream.