Package org.jpos.iso

Class EbcdicHexInterpreter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPackedLength​(int nBytes)
      Returns double nBytes because the hex representation of 1 byte needs 2 hex digits.
      void interpret​(byte[] data, byte[] b, int offset)
      Converts the binary data into EBCDIC hex digits.
      byte[] uninterpret​(byte[] rawData, int offset, int length)
      Converts the EBCDIC hex digits into binary data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • interpret

        public void interpret​(byte[] data,
                              byte[] b,
                              int offset)
        Converts the binary data into EBCDIC hex digits.
        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)
        Converts the EBCDIC hex digits into binary data.
        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.