Class LiteralBinaryInterpreter
java.lang.Object
org.jpos.iso.LiteralBinaryInterpreter
- All Implemented Interfaces:
BinaryInterpreter
This interpreter does no conversion and leaves the input the same as the output.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LiteralBinaryInterpreterThe only instance of this interpreter. -
Method Summary
Modifier and TypeMethodDescriptionintgetPackedLength(int nBytes) Returns nBytes because we are not doing any conversion.voidinterpret(byte[] data, byte[] b, int offset) Copies the input to the output.byte[]uninterpret(byte[] rawData, int offset, int length) Copies the data out of the byte array.
-
Field Details
-
INSTANCE
The only instance of this interpreter.
-
-
Method Details
-
interpret
Copies the input to the output.- Specified by:
interpretin interfaceBinaryInterpreter- Parameters:
data- The data to be interpreted.b- The byte array to write the interpreted data to.offset- The starting position in b.
-
uninterpret
Copies the data out of the byte array.- Specified by:
uninterpretin interfaceBinaryInterpreter- Parameters:
rawData- The interpreted data.offset- The index in rawData to start uninterpreting at.length- The number of uninterpreted bytes to uninterpret. This number may be different from the number of raw bytes that are uninterpreted.- Returns:
- The uninterpreted data.
-
getPackedLength
Returns nBytes because we are not doing any conversion.- Specified by:
getPackedLengthin interfaceBinaryInterpreter
-