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 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 bitLength(byte[] byteArray)
byteArray
- The byte array. May be null
.null
.public static int byteLength(int bitLength)
bitLength
- The bit length.Copyright © 2017 Connect2id Ltd.. All rights reserved.