Save This Page
Home » openjdk-7 » com.sun.jndi » ldap » [javadoc | source]
com.sun.jndi.ldap
public final class: BerDecoder [javadoc | source]
java.lang.Object
   com.sun.jndi.ldap.Ber
      com.sun.jndi.ldap.BerDecoder
A BER decoder. Contains methods to parse a BER buffer.
Fields inherited from com.sun.jndi.ldap.Ber:
buf,  offset,  bufsize,  ASN_BOOLEAN,  ASN_INTEGER,  ASN_BIT_STRING,  ASN_SIMPLE_STRING,  ASN_OCTET_STR,  ASN_NULL,  ASN_OBJECT_ID,  ASN_SEQUENCE,  ASN_SET,  ASN_PRIMITIVE,  ASN_UNIVERSAL,  ASN_CONSTRUCTOR,  ASN_APPLICATION,  ASN_CONTEXT,  ASN_PRIVATE,  ASN_ENUMERATED
Constructor:
 public BerDecoder(byte[] buf,
    int offset,
    int bufsize) 
Method from com.sun.jndi.ldap.BerDecoder Summary:
bytesLeft,   getParsePosition,   parseBoolean,   parseByte,   parseEnumeration,   parseInt,   parseLength,   parseOctetString,   parseSeq,   parseString,   parseStringWithTag,   peekByte,   reset,   seek
Methods from com.sun.jndi.ldap.Ber:
dumpBER
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.jndi.ldap.BerDecoder Detail:
 public int bytesLeft() 
    Returns the number of unparsed bytes in this BER buffer.
 public int getParsePosition() 
    Returns the current parse position. It points to the byte that will be parsed next. Useful for parsing sequences.
 public boolean parseBoolean() throws DecodeException 
    Parses an ASN_BOOLEAN tagged integer from this BER buffer.
 public int parseByte() throws DecodeException 
    Parses the next byte in this BER buffer.
 public int parseEnumeration() throws DecodeException 
    Parses an ASN_ENUMERATED tagged integer from this BER buffer.
 public int parseInt() throws DecodeException 
    Parses an ASN_INTEGER tagged integer from this BER buffer.
 public int parseLength() throws DecodeException 
    Parses a possibly variable length field.
 public byte[] parseOctetString(int tag,
    int[] rlen) throws DecodeException 
    Parses an octet string of a given type(tag) from this BER buffer.
    BER Binary Data of type "tag" ::= tag length {byte}*
    
 public int parseSeq(int[] rlen) throws DecodeException 
    Parses the next sequence in this BER buffer.
 public String parseString(boolean decodeUTF8) throws DecodeException 
    Parses a string.
 public String parseStringWithTag(int tag,
    boolean decodeUTF8,
    int[] rlen) throws DecodeException 
    Parses a string of a given tag from this BER buffer.
    BER simple string ::= tag length {byte}*
    
 public int peekByte() throws DecodeException 
    Returns the next byte in this BER buffer without consuming it.
 public  void reset() 
    Resets this decode to start parsing from the initial offset (ie., same state as after calling the constructor).
  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?