Package com.mapr.baseutils
Class BinaryString
java.lang.Object
com.mapr.baseutils.BinaryString
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]fromUUIDString(String uuid) static bytetoBinaryFromHex(byte ch) Takes a ASCII digit in the range A-F0-9 and returns the corresponding integer/ordinal value.static byte[]toBytesBinary(String in) static StringtoStringBinary(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 StringtoStringHex(byte[] b) static StringtoUUIDString(byte[] uuid)
-
Field Details
-
UUID_PATTERN
-
-
Constructor Details
-
BinaryString
public BinaryString()
-
-
Method Details
-
toUUIDString
-
fromUUIDString
-
toStringBinary
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
-
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
-