Class NullPrefixer
java.lang.Object
org.jpos.iso.NullPrefixer
- All Implemented Interfaces:
Prefixer
AsciiPrefixer constructs a prefix for ASCII messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NullPrefixerA handy instance of the null prefixer. -
Method Summary
Modifier and TypeMethodDescriptionintdecodeLength(byte[] b, int offset) Returns -1 meaning there is no length field.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.
-
Field Details
-
INSTANCE
A handy instance of the null prefixer.
-
-
Method Details
-
encodeLength
Description copied from interface:PrefixerFills a byte array with the field length data in raw form.- Specified by:
encodeLengthin interfacePrefixer- Parameters:
length- The length to be encoded.b- The byte array to fill with the encoded length.
-
decodeLength
Returns -1 meaning there is no length field.- Specified by:
decodeLengthin interfacePrefixer- 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.
-
getPackedLength
Description copied from interface:PrefixerReturns the number of bytes taken up by the length encoding.- Specified by:
getPackedLengthin interfacePrefixer
-