Class EbcdicBinaryInterpreter
java.lang.Object
org.jpos.iso.EbcdicBinaryInterpreter
- All Implemented Interfaces:
BinaryInterpreter
Implements EBCDIC Binary Interpreter. byte[] are converted to and from EBCDIC bytes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetPackedLength(int nDataUnits) Returns the number of bytes required to interpret a byte array of length nBytes.voidinterpret(byte[] data, byte[] b, int offset) (non-Javadoc)byte[]uninterpret(byte[] rawData, int offset, int length) Converts the raw byte array into a uninterpreted byte array.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EbcdicBinaryInterpreter
public EbcdicBinaryInterpreter()
-
-
Method Details
-
interpret
(non-Javadoc)- 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
Description copied from interface:BinaryInterpreterConverts the raw byte array into a uninterpreted byte array. This reverses the interpret method.- 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
Description copied from interface:BinaryInterpreterReturns the number of bytes required to interpret a byte array of length nBytes.- Specified by:
getPackedLengthin interfaceBinaryInterpreter- See Also:
-