Modifier and Type | Field and Description |
---|---|
static EbcdicPrefixer |
L
A length prefixer for up to 9 chars.
|
static EbcdicPrefixer |
LL
A length prefixer for up to 99 chars.
|
static EbcdicPrefixer |
LLL
A length prefixer for up to 999 chars.
|
static EbcdicPrefixer |
LLLL
A length prefixer for up to 9999 chars.
|
Constructor and Description |
---|
EbcdicPrefixer(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 EbcdicPrefixer L
public static final EbcdicPrefixer LL
public static final EbcdicPrefixer LLL
public static final EbcdicPrefixer LLLL
public void encodeLength(int length, byte[] b)
Prefixer
encodeLength
in interface Prefixer
length
- The length to be encoded.b
- The byte array to fill with the encoded length.public int decodeLength(byte[] b, int offset)
Prefixer
decodeLength
in interface Prefixer
b
- The byte array to scan for the length.offset
- The offset to start scanning from.public int getPackedLength()
Prefixer
getPackedLength
in interface Prefixer