Package org.jpos.iso
Class EbcdicInterpreter
- java.lang.Object
-
- org.jpos.iso.EbcdicInterpreter
-
- All Implemented Interfaces:
Interpreter
public class EbcdicInterpreter extends java.lang.Object implements Interpreter
Implements EBCDIC Interpreter. Strings are converted to and from EBCDIC bytes.
-
-
Field Summary
Fields Modifier and Type Field Description static EbcdicInterpreter
INSTANCE
An instance of this Interpreter.
-
Constructor Summary
Constructors Constructor Description EbcdicInterpreter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPackedLength(int nDataUnits)
(non-Javadoc)void
interpret(java.lang.String data, byte[] b, int offset)
(non-Javadoc)java.lang.String
uninterpret(byte[] rawData, int offset, int length)
(non-Javadoc)
-
-
-
Field Detail
-
INSTANCE
public static final EbcdicInterpreter INSTANCE
An instance of this Interpreter. Only one needed for the whole system
-
-
Constructor Detail
-
EbcdicInterpreter
public EbcdicInterpreter()
-
-
Method Detail
-
interpret
public void interpret(java.lang.String data, byte[] b, int offset)
(non-Javadoc)- Specified by:
interpret
in interfaceInterpreter
-
uninterpret
public java.lang.String uninterpret(byte[] rawData, int offset, int length)
(non-Javadoc)- Specified by:
uninterpret
in interfaceInterpreter
- Parameters:
rawData
- The interpreted data.offset
- The index in rawData to start interpreting at.length
- The number of data units to interpret.- Returns:
- The uninterpreted data.
-
getPackedLength
public int getPackedLength(int nDataUnits)
(non-Javadoc)- Specified by:
getPackedLength
in interfaceInterpreter
-
-