public class ByteUtils extends 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(String hex) |
static String |
encodeHexString(byte[] bytes) |
static byte[] |
lastNBytes(byte[] toTruncate,
int length)
Obtains the last 'length' bytes from a byte array
|
static byte[] |
toByteArray(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(String hex)
public static 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(Number toByteInArray)
toByteInArray - the number to convertCopyright © 2022. All rights reserved.