Class IF_FBINARY.FullyConsumingPrefixer
java.lang.Object
org.jpos.tlv.packager.IF_FBINARY.FullyConsumingPrefixer
- All Implemented Interfaces:
Prefixer
- Enclosing class:
IF_FBINARY
A Prefixer that consumes all available bytes (no explicit length).
-
Method Summary
Modifier and TypeMethodDescriptionintdecodeLength(byte[] bytes, int offset) Decodes an encoded length from the byte array.voidencodeLength(int length, byte[] bytes) Encodes the field length into the byte array.intReturns the number of bytes taken up by the length encoding.
-
Method Details
-
encodeLength
Description copied from interface:PrefixerEncodes the field length into the byte array.- Specified by:
encodeLengthin interfacePrefixer- Parameters:
length- the field length to encodebytes- the byte array to write the length prefix into
-
decodeLength
Description copied from interface:PrefixerDecodes an encoded length from the byte array.- Specified by:
decodeLengthin interfacePrefixer- Parameters:
bytes- the byte array containing the length prefixoffset- the offset inbwhere the prefix starts- Returns:
- the length in chars of the field data to follow this prefix
-
getPackedLength
Description copied from interface:PrefixerReturns the number of bytes taken up by the length encoding.- Specified by:
getPackedLengthin interfacePrefixer- Returns:
- the number of bytes used by the length encoding
-