|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.asn1.LBERDecoder
This class provides LBER decoding routines for ASN.1 Types. LBER is a subset of BER as described in the following taken from 5.1 of RFC 2251:
5.1. Mapping Onto BER-based Transport Services The protocol elements of LDAP are encoded for exchange using the Basic Encoding Rules (BER) [11] of ASN.1 [3]. However, due to the high overhead involved in using certain elements of the BER, the following additional restrictions are placed on BER-encodings of LDAP protocol elements:
These restrictions do not apply to ASN.1 types encapsulated inside of OCTET STRING values, such as attribute values, unless otherwise noted.
[3] ITU-T Rec. X.680, "Abstract Syntax Notation One (ASN.1) - Specification of Basic Notation", 1994.
[11] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: Basic, Canonical, and Distinguished Encoding Rules", 1994.
Constructor Summary | |
LBERDecoder()
|
Method Summary | |
ASN1Object |
decode(byte[] value)
Decode an LBER encoded value into an ASN1Type from a byte array. |
ASN1Object |
decode(java.io.InputStream in)
Decode an LBER encoded value into an ASN1Type from an InputStream. |
ASN1Object |
decode(java.io.InputStream in,
int[] len)
Decode an LBER encoded value into an ASN1Object from an InputStream. |
java.lang.Object |
decodeBoolean(java.io.InputStream in,
int len)
Decode a boolean directly from a stream. |
java.lang.Object |
decodeCharacterString(java.io.InputStream in,
int len)
Decode a CharacterString directly from a stream. |
java.lang.Object |
decodeNumeric(java.io.InputStream in,
int len)
Decode a Numeric type directly from a stream. |
java.lang.Object |
decodeOctetString(java.io.InputStream in,
int len)
Decode an OctetString directly from a stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LBERDecoder()
Method Detail |
public ASN1Object decode(byte[] value)
decode
in interface ASN1Decoder
value
- A byte array that points to the encoded ASN1 datapublic ASN1Object decode(java.io.InputStream in) throws java.io.IOException
decode
in interface ASN1Decoder
in
- An input stream containig the encoded ASN.1 data.
java.io.IOException
public ASN1Object decode(java.io.InputStream in, int[] len) throws java.io.IOException
This method also returns the total length of this encoded ASN1Object (length of type + length of length + length of content) in the parameter len. This information is helpful when decoding structured types.
decode
in interface ASN1Decoder
len
- The decoded components encoded length. This value is
handy when decoding structured types. It allows you to accumulate
the number of bytes decoded, so you know when the structured
type has decoded all of its components.in
- An input stream containig the encoded ASN.1 data.
java.io.IOException
public final java.lang.Object decodeBoolean(java.io.InputStream in, int len) throws java.io.IOException
decodeBoolean
in interface ASN1Decoder
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public final java.lang.Object decodeNumeric(java.io.InputStream in, int len) throws java.io.IOException
decodeNumeric
in interface ASN1Decoder
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public final java.lang.Object decodeOctetString(java.io.InputStream in, int len) throws java.io.IOException
decodeOctetString
in interface ASN1Decoder
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public final java.lang.Object decodeCharacterString(java.io.InputStream in, int len) throws java.io.IOException
decodeCharacterString
in interface ASN1Decoder
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |