public class ByteArray
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
EMPTY_BYTE_ARRAY |
| Constructor and Description |
|---|
ByteArray() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
fromHex(java.lang.String x) |
static byte[] |
fromHexString(java.lang.String data)
get bytes data from hex string data.
|
static byte[] |
fromInt(int val) |
static byte[] |
fromLong(long val) |
static java.math.BigInteger |
hexToBigInteger(java.lang.String input) |
static boolean |
isEmpty(byte[] input) |
static boolean |
isHexString(java.lang.String str) |
static int |
jsonHexToInt(java.lang.String x) |
static boolean |
matrixContains(java.util.List<byte[]> source,
byte[] obj) |
static byte[] |
subArray(byte[] input,
int start,
int end)
Generate a subarray of a given byte array.
|
static java.lang.String |
toHexString(byte[] data) |
static java.lang.String |
toJsonHex(byte[] x)
Stringify byte[] x
null for null
null for empty []
|
static java.lang.String |
toJsonHex(java.lang.Long x) |
public static java.lang.String toHexString(byte[] data)
public static byte[] fromHexString(java.lang.String data)
public static byte[] fromLong(long val)
public static byte[] fromInt(int val)
public static java.lang.String toJsonHex(byte[] x)
public static java.lang.String toJsonHex(java.lang.Long x)
public static java.math.BigInteger hexToBigInteger(java.lang.String input)
public static int jsonHexToInt(java.lang.String x)
throws java.lang.Exception
java.lang.Exceptionpublic static byte[] subArray(byte[] input,
int start,
int end)
input - the input byte arraystart - the start indexend - the end indexpublic static boolean isEmpty(byte[] input)
public static boolean matrixContains(java.util.List<byte[]> source,
byte[] obj)
public static java.lang.String fromHex(java.lang.String x)
public static boolean isHexString(java.lang.String str)