public final class ByteUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
fromInts(int[] ints)
Converts an array of integers into an array of bytes.
|
static String |
toHexadecimal(byte[] bytes)
Get a hexadecimal string from given array of bytes.
|
static int[] |
toInts(byte[] bytes)
Converts an array of bytes into an array of integers.
|
static long |
toNumber(byte[] bytes)
Get a number from a given array of bytes.
|
static long |
toNumber(byte[] bytes,
int start,
int end)
Get a number from a given array of bytes.
|
public static long toNumber(byte[] bytes)
bytes - a byte arraypublic static long toNumber(byte[] bytes,
int start,
int end)
bytes - a byte arraystart - first byte of the arrayend - last byte of the array (exclusive)public static String toHexadecimal(byte[] bytes)
bytes - byte arraypublic static int[] toInts(byte[] bytes)
bytes - An array of bytes to be converted into integers. This array should be at least 16 bytes long.public static byte[] fromInts(int[] ints)
ints - An array of integers to be converted into bytes. This array should contain exactly 4 integers.Copyright © 2024. All rights reserved.