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) Encodes the field length into the byte array.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:PrefixerEncodes the field length into the byte array.- Specified by:
encodeLengthin interfacePrefixer- Parameters:
length- the field length to encodeb- the byte array to write the length prefix into
-
decodeLength
Returns -1 meaning there is no length field.- Specified by:
decodeLengthin interfacePrefixer- Parameters:
b- 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
-