public final class LdapEncoder extends Object
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
encodeMessage(Asn1Buffer buffer,
LdapApiService codec,
Message message)
Generate the PDU which contains the encoded object.
|
public static ByteBuffer encodeMessage(Asn1Buffer buffer, LdapApiService codec, Message message) throws EncoderException
0x30 L1 | +--> 0x02 L2 MessageId +--> ProtocolOp +--> Controls L2 = Length(MessageId) L1 = Length(0x02) + Length(L2) + L2 + Length(ProtocolOp) + Length(Controls) LdapMessageLength = Length(0x30) + Length(L1) + L1
buffer
- The Asn1Buffer instance in which we store the temporary resultcodec
- The LdapApiService instancemessage
- The message to encodeEncoderException
- If anything goes wrong.Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.