|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.AbstractControl
org.apache.directory.shared.ldap.codec.controls.ControlImpl
public class ControlImpl
A genericcodec Control.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl |
|---|
decoder, value, valueLength |
| Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
parent |
| Constructor Summary | |
|---|---|
ControlImpl(java.lang.String oid)
Default constructor. |
|
| Method Summary | |
|---|---|
int |
computeLength()
Compute the Control length |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Generate the PDU which contains the Control. |
byte[] |
getValue()
Get the raw control encoded bytes |
void |
setValue(byte[] value)
Set the encoded control value |
| Methods inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl |
|---|
computeLength, getDecoder, getOid, hasValue, isCritical, setCritical, toString |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ControlImpl(java.lang.String oid)
| Method Detail |
|---|
public void setValue(byte[] value)
setValue in interface ControlsetValue in class AbstractControlencodedValue - The encoded control value to storepublic byte[] getValue()
getValue in interface ControlgetValue in class AbstractControlpublic int computeLength()
Control :
0x30 L1
|
+--> 0x04 L2 controlType
[+--> 0x01 0x01 criticality]
[+--> 0x04 L3 controlValue]
Control length = Length(0x30) + length(L1)
+ Length(0x04) + Length(L2) + L2
[+ Length(0x01) + 1 + 1]
[+ Length(0x04) + Length(L3) + L3]
computeLength in interface Asn1ObjectcomputeLength in interface CodecControlcomputeLength in class AbstractControl
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws EncoderException
Control : 0x30 LL 0x04 LL type [0x01 0x01 criticality] [0x04 LL value]
encode in interface Asn1Objectencode in interface CodecControlencode in class AbstractControlbuffer - The encoded PDU
EncoderException - If anything goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||