| Constructor and Description |
|---|
ByteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bitLength(byte[] byteArray)
Returns the byte length of the specified byte array.
|
static int |
bitLength(int byteLength)
Returns the bit length of the specified byte length.
|
static int |
byteLength(int bitLength)
Returns the byte length of the specified bit length.
|
static byte[] |
concat(byte[]... byteArrays)
Concatenates the specified byte arrays.
|
static int |
safeBitLength(byte[] byteArray)
Returns the byte length of the specified byte array, preventing
integer overflow.
|
static int |
safeBitLength(int byteLength)
Returns the bit length of the specified byte length, preventing
integer overflow.
|
static byte[] |
subArray(byte[] byteArray,
int beginIndex,
int length)
Returns a portion of the specified byte array.
|
public ByteUtils()
public static byte[] concat(byte[]... byteArrays)
byteArrays - The byte arrays to concatenate, may be
null.public static byte[] subArray(byte[] byteArray, int beginIndex, int length)
byteArray - The byte array. Must not be null.beginIndex - The beginning index, inclusive. Must be zero or
positive.length - The length. Must be zero or positive.public static int bitLength(int byteLength)
byteLength - The byte length.public static int safeBitLength(int byteLength) throws IntegerOverflowException
byteLength - The byte length.IntegerOverflowException - On a integer overflow.public static int bitLength(byte[] byteArray)
byteArray - The byte array. May be null.null.public static int safeBitLength(byte[] byteArray) throws IntegerOverflowException
byteArray - The byte array. May be null.null.IntegerOverflowException - On a integer overflow.public static int byteLength(int bitLength)
bitLength - The bit length.Copyright © 2020 Connect2id Ltd.. All rights reserved.