Class BinaryUtils

java.lang.Object
com.eka.middleware.pub.util.rest.BinaryUtils

public class BinaryUtils extends Object
Utilities for encoding and decoding binary data to and from different forms.
  • Constructor Details

    • BinaryUtils

      public BinaryUtils()
  • Method Details

    • toHex

      public static String toHex(byte[] data)
      Converts byte data to a Hex-encoded string.
      Parameters:
      data - data to hex encode.
      Returns:
      hex-encoded string.
    • fromHex

      public static byte[] fromHex(String hexData)
      Converts a Hex-encoded data string to the original byte data.
      Parameters:
      hexData - hex-encoded data to decode.
      Returns:
      decoded data from the hex string.