Interface Prefixer
- All Known Implementing Classes:
AsciiPrefixer, BcdPrefixer, BinaryPrefixer, EbcdicPrefixer, HexNibblesPrefixer, IF_FBINARY.FullyConsumingPrefixer, IF_FCHAR.FullyConsumingPrefixer, NullPrefixer
public interface Prefixer
This interface is used to encode and decode length prefixes.
-
Method Summary
Modifier and TypeMethodDescriptionintdecodeLength(byte[] b, int offset) Decodes an encoded length.voidencodeLength(int length, byte[] b) Fills a byte array with the field length data in raw form.intReturns the number of bytes taken up by the length encoding.
-
Method Details
-
encodeLength
Fills a byte array with the field length data in raw form.- Parameters:
length- The length to be encoded.b- The byte array to fill with the encoded length.- Throws:
ISOException
-
decodeLength
Decodes an encoded length.- Parameters:
b- The byte array to scan for the length.offset- The offset to start scanning from.- Returns:
- The length in chars of the field data to follow this LengthPrefix.
- Throws:
ISOException
-
getPackedLength
int getPackedLength()Returns the number of bytes taken up by the length encoding.
-