|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the methods for decoding each of the ASN.1 types. Decoders which implement this interface may be used to decode any of the ASN1Object data types.
This package also provides the BERDecoder class that can be used to BER decode ASN.1 classes. However an application might chose to use its own decoder class.
This interface thus allows an application to use this package to decode ASN.1 objects using other decoding rules if needed.
Note that LDAP packets are required to be BER encoded. Since this package includes a BER decoder no application provided decoder is needed for building LDAP packets.
Method Summary | |
ASN1Object |
decode(byte[] value)
Decode an encoded value into an ASN1Object from a byte array. |
ASN1Object |
decode(java.io.InputStream in)
Decode an encoded value into an ASN1Object from an InputStream. |
ASN1Object |
decode(java.io.InputStream in,
int[] length)
Decode an 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 value directly from a stream. |
java.lang.Object |
decodeOctetString(java.io.InputStream in,
int len)
Decode an OCTET_STRING directly from a stream. |
Method Detail |
public ASN1Object decode(byte[] value)
value
- A byte array that points to the encoded ASN1 datapublic ASN1Object decode(java.io.InputStream in) throws java.io.IOException
in
- An input stream containig the encoded ASN.1 data.
java.io.IOException
public ASN1Object decode(java.io.InputStream in, int[] length) throws java.io.IOException
length
- 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 java.lang.Object decodeBoolean(java.io.InputStream in, int len) throws java.io.IOException
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public java.lang.Object decodeNumeric(java.io.InputStream in, int len) throws java.io.IOException
Can be used to decodes INTEGER and ENUMERATED types.
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public java.lang.Object decodeOctetString(java.io.InputStream in, int len) throws java.io.IOException
in
- An input stream containig the encoded ASN.1 data.len
- Length in bytes
java.io.IOException
public java.lang.Object decodeCharacterString(java.io.InputStream in, int len) throws java.io.IOException
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 |