|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
public abstract class AbstractAsn1Object
An abstract class which implements basic TLV operations.
Field Summary | |
---|---|
protected AbstractAsn1Object |
parent
The encapsulating Object |
Constructor Summary | |
---|---|
protected |
AbstractAsn1Object()
Default constructor. |
protected |
AbstractAsn1Object(int tlvId)
Constructor associated with a TLV indentifier. |
Method Summary | |
---|---|
void |
addLength(int length)
Add a length to the object |
abstract int |
computeLength()
Compute the object length, which is the sum of all inner length. |
java.nio.ByteBuffer |
encode(java.nio.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)
Set the parent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractAsn1Object parent
Constructor Detail |
---|
protected AbstractAsn1Object(int tlvId)
tlvId
- The TLV Id.protected AbstractAsn1Object()
Method Detail |
---|
public int getCurrentLength()
getCurrentLength
in interface Asn1Object
public abstract int computeLength()
computeLength
in interface Asn1Object
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
buffer
- The buffer where to put the PDU
EncoderException
- if the buffer can't be encodedpublic int getExpectedLength()
getExpectedLength
in interface Asn1Object
public void addLength(int length) throws DecoderException
addLength
in interface Asn1Object
length
- The length to add.
DecoderException
- Thrown if the current length exceed the expected lengthpublic void setExpectedLength(int expectedLength)
setExpectedLength
in interface Asn1Object
expectedLength
- The expectedLength to set.public void setCurrentLength(int currentLength)
setCurrentLength
in interface Asn1Object
currentLength
- The currentLength to set.public AbstractAsn1Object getParent()
getParent
in interface Asn1Object
public 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 |