Class HexBin


public final class HexBin extends Object
format validation This class encodes/decodes hexadecimal data
  • Constructor Details

    • HexBin

      public HexBin()
  • Method Details

    • isHex

      public static boolean isHex(String isValidString)
      DOCUMENT ME!
      Parameters:
      isValidString - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • encode

      public static byte[] encode(byte[] aBinaryData)
      Encode binary data to Hex
      Parameters:
      aBinaryData - Binary data to Hex encode
      Returns:
      return Hex encoded array
    • decode

      public static byte[] decode(byte[] aHexData)
      Decode Hex data to binary data
      Parameters:
      aHexData - Hex data to Hex decode
      Returns:
      return Hex decoded binary data
    • getDecodedDataLength

      public static int getDecodedDataLength(byte[] aHexData)
      Get length length of the Hex data
      Parameters:
      aHexData - DOCUMENT ME!
      Returns:
      Length of Hex data if is Hex data; -1 otherwise.