| public int readLength() throws IOException Decode the length of the field. Can only support length encoding up to 4 octets. In BER/DER encoding, length can
be encoded in 2 forms:
-
Short form - One octet. Bit 8 has value "0" and bits 7-1 give the length.
-
Long form - Two to 127 octets (only 4 is supported here). Bit 8 of first octet has value "1" and bits 7-1 give
the number of additional length octets. Second and following octets give the length, base 256, most significant
digit first.
- Returns:int
The length as integer
- Exceptions
- IOException:
- If invalid format found
|