Class LdapDecoder
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.LdapDecoder
-
public class LdapDecoder extends Object
The LdapDecoder decodes ASN.1 BER encoded PDUs into LDAP messages- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAX_PDU_SIZE_ATTRThe maximum PDU size, stored into the LDAPSession's attributestatic StringMESSAGE_CONTAINER_ATTRThe name of the LdapSession's attribute for the LDAP container used during the decoding
-
Constructor Summary
Constructors Constructor Description LdapDecoder()Creates an instance of a Ldap Decoder implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Messagedecode(InputStream in, LdapMessageContainer<? extends Message> container)Decodes a PDU from an input stream into a Ldap message container.
-
-
-
Field Detail
-
MESSAGE_CONTAINER_ATTR
public static final String MESSAGE_CONTAINER_ATTR
The name of the LdapSession's attribute for the LDAP container used during the decoding- See Also:
- Constant Field Values
-
MAX_PDU_SIZE_ATTR
public static final String MAX_PDU_SIZE_ATTR
The maximum PDU size, stored into the LDAPSession's attribute- See Also:
- Constant Field Values
-
-
Method Detail
-
decode
public Message decode(InputStream in, LdapMessageContainer<? extends Message> container) throws DecoderException
Decodes a PDU from an input stream into a Ldap message container. We can only decode one complete message.- Parameters:
in- The input stream to read and decode PDU bytes fromcontainer- The LdapMessageContainer containing the message to decode- Returns:
- return The decoded message
- Throws:
DecoderException- If the decoding failed
-
-