|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.asn1.ber.Length
The length component of a BER TLV Tuple.
Field Summary | |
private java.nio.ByteBuffer |
buf
a byte buffer used to collect the arriving length octets |
static int |
END_MASK
the end long form terminate bit flag mask |
static int |
INDEFINITE
used to mark length as indefinite |
private boolean |
isFixated
whether or not this length has been fixated |
private int |
numOctets
the number of octets needed to complete this length component |
static int |
UNDEFINED
used to mark length as undefined |
private int |
value
the value for this tlv length |
Constructor Summary | |
Length()
|
Method Summary | |
(package private) void |
add(byte octet)
Adds an octet to this Length component and as a side effect fixates the Length component if all the required length data has arrived. |
(package private) void |
clear()
Clears this tag's data of all bytes and values calculated so all is as it was when this instance was created. |
(package private) void |
fixate()
Fixates the data within this Length calculating all the derived properties from the existing set of octets. |
int |
getLength()
Gets the length of the value. |
static int |
getLength(java.nio.ByteBuffer octets)
Decodes the length of a value for a tlv using the Length field bytes. |
boolean |
isFixated()
Checks to see if the length has been fixated. |
int |
size()
Gets the number of octets currently in this Length component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INDEFINITE
public static final int UNDEFINED
public static final int END_MASK
private int value
private int numOctets
private boolean isFixated
private final java.nio.ByteBuffer buf
Constructor Detail |
public Length()
Method Detail |
public boolean isFixated()
void clear()
void fixate() throws org.apache.asn1.codec.DecoderException
org.apache.asn1.codec.DecoderException
- if this Length is invalidvoid add(byte octet) throws org.apache.asn1.codec.DecoderException
octet
- the 8 bit byte to add
org.apache.asn1.codec.DecoderException
public int getLength()
public int size()
public static int getLength(java.nio.ByteBuffer octets) throws org.apache.asn1.codec.DecoderException
octets
- the length field bytes in the TLV
org.apache.asn1.codec.DecoderException
- if the precision cannot hold the number
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |