| java.lang.Object | |
| ↳ | com.facebook.common.util.Hex |
Basic hex operations: from byte array to string and vice versa.
TODO: move to the framework and consider implementing as native code.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Hex() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static String |
byte2Hex(int value)
Convert an int [0-255] to a hexadecimal string representation.
| ||||||||||
| static byte[] |
decodeHex(String hexString)
Quickly converts a hexadecimal string to a byte array.
| ||||||||||
| static String |
encodeHex(byte[] array, boolean zeroTerminated)
Quickly converts a byte array to a hexadecimal string representation.
| ||||||||||
| static byte[] | hexStringToByteArray(String s) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Convert an int [0-255] to a hexadecimal string representation.
| value | int value. |
|---|
Quickly converts a hexadecimal string to a byte array.
Quickly converts a byte array to a hexadecimal string representation.
| array | byte array, possibly zero-terminated. |
|---|