getBit(int) -
Method in class org.apache.directory.shared.asn1.primitives.BitString
Get the bit stored into the BitString at a specific position? The
position start at 0, which is on the left : With '1001 000x', where x is
an unused bit, ^ ^ ^^ | | || | | |+---- getBit(7) -> DecoderException | |
+----- getBit(6) = 0 | +---------- getBit(2) = 0 +------------ getBit(0) =
1
getBytes(int) -
Static method in class org.apache.directory.shared.asn1.ber.tlv.Length
Utility function that return a byte array representing the length
getBytes(int) -
Static method in class org.apache.directory.shared.asn1.ber.tlv.Value
Utility function that return a byte array representing the Value We must
respect the ASN.1 BER encoding scheme : 1) positive integer - [0 - 0x7F] :
0xVV - [0x80 - 0xFF] : 0x00 0xVV - [0x0100 - 0x7FFF] : 0xVV 0xVV -
[0x8000 - 0xFFFF] : 0x00 0xVV 0xVV - [0x010000 - 0x7FFFFF] : 0xVV 0xVV
0xVV - [0x800000 - 0xFFFFFF] : 0x00 0xVV 0xVV 0xVV - [0x01000000 -
0x7FFFFFFF] : 0xVV 0xVV 0xVV 0xVV - [0x80000000 - 0xFFFFFFFF] : 0x00 0xVV
0xVV 0xVV 0xVV 2) Negative number - (~value) + 1
A decoder which decodes encoded data as it arrives in peices while
maintaining the state of the decode operation between the arrival of encoded
chunks.
Overflow could have two meaning : either there are more than 5 bytes to
encode the value (5 bytes = 5bits + 4*7 bits = 33 bits) or the value that
is represented by those bytes is over MAX_INTEGER