|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.asn1.AbstractAsn1Object
public abstract class AbstractAsn1Object
An abstract class which implements basic TLV operations.
| Constructor Summary | |
|---|---|
protected |
AbstractAsn1Object()
Default constructor. |
protected |
AbstractAsn1Object(int tlvId)
Constructor associated with a TLV identifier. |
| Method Summary | |
|---|---|
void |
addLength(int length)
Add a length to the object |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the object to a PDU. |
int |
getCurrentLength()
Get the current object length, which is the sum of all inner length already decoded. |
int |
getExpectedLength()
Get the expected object length. |
AbstractAsn1Object |
getParent()
Get the parent |
int |
getTlvId()
|
void |
setCurrentLength(int currentLength)
Set the current length |
void |
setExpectedLength(int expectedLength)
Set the expected length |
void |
setParent(AbstractAsn1Object parent)
Sets the parent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.directory.api.asn1.Asn1Object |
|---|
computeLength |
| Constructor Detail |
|---|
protected AbstractAsn1Object(int tlvId)
tlvId - The TLV Id.protected AbstractAsn1Object()
| Method Detail |
|---|
public void addLength(int length)
throws DecoderException
addLength in interface Asn1Objectlength - The length to add.
DecoderException - Thrown if the current length exceed the expected length
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
encode in interface Asn1Objectbuffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encodedpublic int getCurrentLength()
getCurrentLength in interface Asn1Objectpublic void setCurrentLength(int currentLength)
setCurrentLength in interface Asn1ObjectcurrentLength - The currentLength to set.public int getExpectedLength()
getExpectedLength in interface Asn1Objectpublic void setExpectedLength(int expectedLength)
setExpectedLength in interface Asn1ObjectexpectedLength - The expectedLength to set.public AbstractAsn1Object getParent()
getParent in interface Asn1Objectpublic void setParent(AbstractAsn1Object parent)
parent - The parent to set.public int getTlvId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||