public class ByteUtils
extends java.lang.Object
| Constructor and Description |
|---|
ByteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
concat(byte[]... arrays)
Joins multiple arrays into a new concatenated array
|
static byte[] |
decodeHex(java.lang.String hex) |
static java.lang.String |
encodeHexString(byte[] bytes) |
static byte[] |
lastNBytes(byte[] toTruncate,
int length)
Obtains the last 'length' bytes from a byte array
|
static byte[] |
toByteArray(java.lang.Number toByteInArray)
Converts a number to a byte value in a byte array
|
public static byte[] concat(byte[]... arrays)
arrays - the array of arrayspublic static byte[] decodeHex(java.lang.String hex)
public static java.lang.String encodeHexString(byte[] bytes)
public static byte[] lastNBytes(byte[] toTruncate,
int length)
toTruncate - the byte array to obtain the bytes fromlength - the number of bytes to obtainpublic static byte[] toByteArray(java.lang.Number toByteInArray)
toByteInArray - the number to convert