Class BinaryString

java.lang.Object
com.mapr.baseutils.BinaryString

public class BinaryString extends Object
  • Field Details

    • UUID_PATTERN

      public static final Pattern UUID_PATTERN
  • Constructor Details

    • BinaryString

      public BinaryString()
  • Method Details

    • toUUIDString

      public static String toUUIDString(byte[] uuid)
    • fromUUIDString

      public static byte[] fromUUIDString(String uuid)
    • toStringBinary

      public static String toStringBinary(byte[] b)
      Taken from Hbase: base/util/Bytes.java Removed offset and length, start at 0 and end at last position Write a printable representation of a byte array. Non-printable characters are hex escaped in the format \\x%02X, eg: \x00 \x05 etc
      Parameters:
      b - array to write out
      Returns:
      string output
    • toStringHex

      public static String toStringHex(byte[] b)
    • toBinaryFromHex

      public static byte toBinaryFromHex(byte ch)
      Takes a ASCII digit in the range A-F0-9 and returns the corresponding integer/ordinal value.
      Parameters:
      ch - The hex digit.
      Returns:
      The converted hex value as a byte.
    • toBytesBinary

      public static byte[] toBytesBinary(String in)