Class EbcdicBinaryInterpreter

java.lang.Object
org.jpos.iso.EbcdicBinaryInterpreter
All Implemented Interfaces:
BinaryInterpreter

public class EbcdicBinaryInterpreter extends Object implements BinaryInterpreter
Implements EBCDIC Binary Interpreter. byte[] are converted to and from EBCDIC bytes.
  • Field Details

  • Constructor Details

  • Method Details

    • interpret

      public void interpret(byte[] data, byte[] b, int offset)
      (non-Javadoc)
      Specified by:
      interpret in interface BinaryInterpreter
      Parameters:
      data - The data to be interpreted.
      b - The byte array to write the interpreted data to.
      offset - The starting position in b.
    • uninterpret

      public byte[] uninterpret(byte[] rawData, int offset, int length)
      Description copied from interface: BinaryInterpreter
      Converts the raw byte array into a uninterpreted byte array. This reverses the interpret method.
      Specified by:
      uninterpret in interface BinaryInterpreter
      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

      public int getPackedLength(int nDataUnits)
      Description copied from interface: BinaryInterpreter
      Returns the number of bytes required to interpret a byte array of length nBytes.
      Specified by:
      getPackedLength in interface BinaryInterpreter
      See Also: