Modifier and Type | Field and Description |
---|---|
static AsciiPrefixer |
L
A length prefixer for up to 9 chars.
|
static AsciiPrefixer |
LL
A length prefixer for up to 99 chars.
|
static AsciiPrefixer |
LLL
A length prefixer for up to 999 chars.
|
static AsciiPrefixer |
LLLL
A length prefixer for up to 9999 chars.
|
static AsciiPrefixer |
LLLLL
A length prefixer for up to 99999 chars.
|
static AsciiPrefixer |
LLLLLL
A length prefixer for up to 999999 chars.
|
Constructor and Description |
---|
AsciiPrefixer(int nDigits) |
Modifier and Type | Method and Description |
---|---|
int |
decodeLength(byte[] b,
int offset)
Decodes an encoded length.
|
void |
encodeLength(int length,
byte[] b)
Fills a byte array with the field length data in raw form.
|
int |
getPackedLength()
Returns the number of bytes taken up by the length encoding.
|
public static final AsciiPrefixer L
public static final AsciiPrefixer LL
public static final AsciiPrefixer LLL
public static final AsciiPrefixer LLLL
public static final AsciiPrefixer LLLLL
public static final AsciiPrefixer LLLLLL
public void encodeLength(int length, byte[] b) throws ISOException
Prefixer
encodeLength
in interface Prefixer
length
- The length to be encoded.b
- The byte array to fill with the encoded length.ISOException
public int decodeLength(byte[] b, int offset) throws ISOException
Prefixer
decodeLength
in interface Prefixer
b
- The byte array to scan for the length.offset
- The offset to start scanning from.ISOException
public int getPackedLength()
Prefixer
getPackedLength
in interface Prefixer