org.apache.directory.api.ldap.codec.api
Class LdapDecoder

java.lang.Object
  extended by 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
static String MAX_PDU_SIZE_ATTR
          The maximum PDU size, stored into the LDAPSession's attribute
static String MESSAGE_CONTAINER_ATTR
          The name of the LdapSession's attribute for the LDAP container used during the decoding
 
Constructor Summary
LdapDecoder()
          Creates an instance of a Ldap Decoder implementation.
 
Method Summary
 Message decode(InputStream in, LdapMessageContainer<MessageDecorator<? extends Message>> container)
          Decodes a PDU from an input stream into a Ldap message container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

LdapDecoder

public LdapDecoder()
Creates an instance of a Ldap Decoder implementation.

Method Detail

decode

public Message decode(InputStream in,
                      LdapMessageContainer<MessageDecorator<? 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 from
Returns:
return The decoded message
Throws:
DecoderException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.