Class HexBin


  • public final class HexBin
    extends java.lang.Object
    format validation This class encodes/decodes hexadecimal data
    • Constructor Summary

      Constructors 
      Constructor Description
      HexBin()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String bytesToString​(byte[] binaryData)
      Converts bytes to a hex string
      static byte[] decode​(byte[] binaryData)  
      static java.lang.String decode​(java.lang.String binaryData)
      Decodes Hex data into octects
      static byte[] encode​(byte[] binaryData)
      array of byte to encode
      static java.lang.String encode​(java.lang.String binaryData)
      Encodes octects (using utf-8) into Hex data
      static byte[] stringToBytes​(java.lang.String hexEncoded)
      Converts a hex string to a byte array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HexBin

        public HexBin()
    • Method Detail

      • bytesToString

        public static java.lang.String bytesToString​(byte[] binaryData)
        Converts bytes to a hex string
      • stringToBytes

        public static byte[] stringToBytes​(java.lang.String hexEncoded)
        Converts a hex string to a byte array.
      • encode

        public static byte[] encode​(byte[] binaryData)
        array of byte to encode
        Parameters:
        binaryData -
        Returns:
        return encode binary array
      • decode

        public static byte[] decode​(byte[] binaryData)
      • decode

        public static java.lang.String decode​(java.lang.String binaryData)
        Decodes Hex data into octects
        Parameters:
        binaryData - String containing Hex data
        Returns:
        string containing decoded data.
      • encode

        public static java.lang.String encode​(java.lang.String binaryData)
        Encodes octects (using utf-8) into Hex data
        Parameters:
        binaryData - String containing Hex data
        Returns:
        string containing decoded data.