public abstract class AbstractAsn1Object extends Object implements Asn1Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAsn1Object()
Default constructor.
|
protected |
AbstractAsn1Object(int tlvId)
Constructor associated with a TLV identifier.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeLengthprotected AbstractAsn1Object(int tlvId)
tlvId - The TLV Id.protected AbstractAsn1Object()
public void addLength(int length)
throws DecoderException
addLength in interface Asn1Objectlength - The length to add.DecoderException - Thrown if the current length exceed the expected lengthpublic ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode in interface Asn1Objectbuffer - The buffer where to put the PDUEncoderException - 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()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.