gnu.inet.ldap
Class BERDecoder
java.lang.Object
gnu.inet.ldap.BERDecoder
public class BERDecoder
- extends java.lang.Object
Utility class for decoding BER values.
For each value to be read, the application must call parseType
to return the type of the value, then the specific
parseXXX
method for the type to return the actual
value, or skip
to skip the value.
Constructor Summary |
BERDecoder(byte[] data,
boolean utf8)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BERDecoder
public BERDecoder(byte[] data,
boolean utf8)
parseType
public int parseType()
throws BERException
- Returns the type of the current value record.
If there are no more records to read, this method returns -1.
- Throws:
BERException
available
public boolean available()
skip
public void skip()
parseBoolean
public boolean parseBoolean()
throws BERException
- Throws:
BERException
parseInt
public int parseInt()
throws BERException
- Throws:
BERException
parseString
public java.lang.String parseString()
throws BERException
- Throws:
BERException
parseOctetString
public byte[] parseOctetString()
throws BERException
- Throws:
BERException
parseSequence
public BERDecoder parseSequence()
throws BERException
- Throws:
BERException
parseSequence
public BERDecoder parseSequence(int code)
throws BERException
- Throws:
BERException
parseSet
public BERDecoder parseSet()
throws BERException
- Throws:
BERException
parseSet
public BERDecoder parseSet(int code)
throws BERException
- Throws:
BERException
main
public static void main(java.lang.String[] args)