| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| public | BerDecoder(byte[] buf, int offset, int bufsize)
Creates a BER decoder that reads bytes from the specified buffer. |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public boolean | Returns: true if the tagged integer is 0; false otherwise.Parses an ASN_BOOLEAN tagged integer from this BER buffer. |
| public int | |
| public int | Returns: The tag of enumeration.Parses an ASN_ENUMERATED tagged integer from this BER buffer. |
| public int | Returns: The value of the integer.Parses an ASN_INTEGER tagged integer from this BER buffer. |
| private int | |
| public int | |
| public byte[] | Returns: A non-null array containing the octet string.The tag to look for. tag, int[] An array for returning the relative parsed position. If null,
the relative parsed position is not returned. rlen)Parses an octet string of a given type(tag) from this BER buffer. |
| public int | Returns: The sequence's tag.An array for returning size of the sequence in bytes. If null,
the size is not returned. rlen)Parses the next sequence in this BER buffer. |
| public String | |
| public String | Returns: The non-null parsed string.The tag that precedes the string. tag, boolean If true, use UTF-8 when decoding the string; otherwise
use ISO-Latin-1 (8859_1). Use true for LDAPv3; false for LDAPv2. decodeUTF8, int[] An array for holding the relative parsed offset; if null
offset not set. rlen)Parses a string of a given tag from this BER buffer. |
| public int | |
| public void | reset()
Resets this decode to start parsing from the initial offset (ie., same state as after calling the constructor). |
| pack-priv void |
| origOffset | back to summary |
|---|---|
| private int origOffset | |
| BerDecoder | back to summary |
|---|---|
| public BerDecoder(byte[] buf, int offset, int bufsize) Creates a BER decoder that reads bytes from the specified buffer. | |
| bytesLeft | back to summary |
|---|---|
| public int bytesLeft() Returns the number of unparsed bytes in this BER buffer. | |
| getParsePosition | back to summary |
|---|---|
| public int getParsePosition() Returns the current parse position. It points to the byte that will be parsed next. Useful for parsing sequences. | |
| parseBoolean | back to summary |
|---|---|
| public boolean parseBoolean() throws DecodeException Parses an ASN_BOOLEAN tagged integer from this BER buffer.
| |
| parseByte | back to summary |
|---|---|
| public int parseByte() throws DecodeException Parses the next byte in this BER buffer.
| |
| parseEnumeration | back to summary |
|---|---|
| public int parseEnumeration() throws DecodeException Parses an ASN_ENUMERATED tagged integer from this BER buffer.
| |
| parseInt | back to summary |
|---|---|
| public int parseInt() throws DecodeException Parses an ASN_INTEGER tagged integer from this BER buffer.
| |
| parseIntWithTag | back to summary |
|---|---|
| private int parseIntWithTag(int tag) throws DecodeException Parses an integer that's preceded by a tag.
| |
| parseLength | back to summary |
|---|---|
| public int parseLength() throws DecodeException Parses a possibly variable length field. | |
| parseOctetString | back to summary |
|---|---|
| public byte[] parseOctetString(int tag, int[] rlen) throws DecodeException Parses an octet string of a given type(tag) from this BER buffer.
| |
| parseSeq | back to summary |
|---|---|
| public int parseSeq(int[] rlen) throws DecodeException Parses the next sequence in this BER buffer.
| |
| parseString | back to summary |
|---|---|
| public String parseString(boolean decodeUTF8) throws DecodeException Parses a string. | |
| parseStringWithTag | back to summary |
|---|---|
| public String parseStringWithTag(int tag, boolean decodeUTF8, int[] rlen) throws DecodeException Parses a string of a given tag from this BER buffer.
| |
| peekByte | back to summary |
|---|---|
| public int peekByte() throws DecodeException Returns the next byte in this BER buffer without consuming it.
| |
| reset | back to summary |
|---|---|
| public void reset() Resets this decode to start parsing from the initial offset (ie., same state as after calling the constructor). | |
| seek | back to summary |
|---|---|
| pack-priv void seek(int i) throws DecodeException Used to skip bytes. Usually used when trying to recover from parse error. Don't need to be public right now?
| |