Package com.mapr.baseutils
Class BinaryString
- java.lang.Object
-
- com.mapr.baseutils.BinaryString
-
public class BinaryString extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.PatternUUID_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 bytetoBinaryFromHex(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.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 java.lang.StringtoStringHex(byte[] b)static java.lang.StringtoUUIDString(byte[] uuid)
-
-
-
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)
-
-