Class BinaryString


  • public class BinaryString
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.regex.Pattern UUID_PATTERN  
    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryString()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] fromUUIDString​(java.lang.String uuid)  
      static byte toBinaryFromHex​(byte ch)
      Takes a ASCII digit in the range A-F0-9 and returns the corresponding integer/ordinal value.
      static byte[] toBytesBinary​(java.lang.String in)  
      static java.lang.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.
      static java.lang.String toStringHex​(byte[] b)  
      static java.lang.String toUUIDString​(byte[] uuid)  
      • Methods inherited from class java.lang.Object

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

      • UUID_PATTERN

        public static final java.util.regex.Pattern UUID_PATTERN
    • Constructor Detail

      • BinaryString

        public BinaryString()
    • Method Detail

      • toUUIDString

        public static java.lang.String toUUIDString​(byte[] uuid)
      • fromUUIDString

        public static byte[] fromUUIDString​(java.lang.String uuid)
      • toStringBinary

        public static java.lang.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 java.lang.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​(java.lang.String in)