public class ByteUtil
extends java.lang.Object
| Constructor and Description |
|---|
ByteUtil() |
| Modifier and Type | Method and Description |
|---|---|
static long |
byteArray4ToLong(byte[] bytes,
int offset) |
static long |
byteArray5ToLong(byte[] bytes,
int offset) |
static int |
byteArrayToInt(byte[] bytes) |
static int |
byteArrayToInt(byte[] bytes,
int offset) |
static int |
byteArrayToIntLittleEndian(byte[] bytes,
int offset) |
static long |
byteArrayToLong(byte[] bytes) |
static long |
byteArrayToLong(byte[] bytes,
int offset) |
static int |
byteArrayToMedium(byte[] bytes,
int offset) |
static int |
byteArrayToShort(byte[] bytes) |
static int |
byteArrayToShort(byte[] bytes,
int offset) |
static byte[] |
combine(byte[]... elements) |
static byte[] |
copyFrom(byte[] input) |
static int |
highBitsToInt(byte value) |
static int |
highBitsToMedium(int value) |
static byte |
intsToByteHighAndLow(int highValue,
int lowValue) |
static int |
intToByteArray(byte[] bytes,
int offset,
int value) |
static byte[] |
intToByteArray(int value) |
static int |
intToLittleEndianByteArray(byte[] bytes,
int offset,
int value) |
static int |
longTo4ByteArray(byte[] bytes,
int offset,
long value) |
static int |
longToByteArray(byte[] bytes,
int offset,
long value) |
static byte[] |
longToByteArray(long l) |
static int |
lowBitsToInt(byte value) |
static int |
lowBitsToMedium(int value) |
static int |
mediumToByteArray(byte[] bytes,
int offset,
int value) |
static byte[] |
mediumToByteArray(int value) |
static int |
shortToByteArray(byte[] bytes,
int offset,
int value) |
static byte[] |
shortToByteArray(int value) |
static int |
shortToLittleEndianByteArray(byte[] bytes,
int offset,
int value) |
static byte[][] |
split(byte[] input,
int firstLength,
int secondLength) |
static byte[][] |
split(byte[] input,
int firstLength,
int secondLength,
int thirdLength) |
static byte[] |
trim(byte[] input,
int length) |
public static byte[] combine(byte[]... elements)
public static byte[][] split(byte[] input,
int firstLength,
int secondLength)
public static byte[][] split(byte[] input,
int firstLength,
int secondLength,
int thirdLength)
throws java.text.ParseException
java.text.ParseExceptionpublic static byte[] trim(byte[] input,
int length)
public static byte[] copyFrom(byte[] input)
public static byte intsToByteHighAndLow(int highValue,
int lowValue)
public static int highBitsToInt(byte value)
public static int lowBitsToInt(byte value)
public static int highBitsToMedium(int value)
public static int lowBitsToMedium(int value)
public static byte[] shortToByteArray(int value)
public static int shortToByteArray(byte[] bytes,
int offset,
int value)
public static int shortToLittleEndianByteArray(byte[] bytes,
int offset,
int value)
public static byte[] mediumToByteArray(int value)
public static int mediumToByteArray(byte[] bytes,
int offset,
int value)
public static byte[] intToByteArray(int value)
public static int intToByteArray(byte[] bytes,
int offset,
int value)
public static int intToLittleEndianByteArray(byte[] bytes,
int offset,
int value)
public static byte[] longToByteArray(long l)
public static int longToByteArray(byte[] bytes,
int offset,
long value)
public static int longTo4ByteArray(byte[] bytes,
int offset,
long value)
public static int byteArrayToShort(byte[] bytes)
public static int byteArrayToShort(byte[] bytes,
int offset)
public static int byteArrayToMedium(byte[] bytes,
int offset)
public static int byteArrayToInt(byte[] bytes)
public static int byteArrayToInt(byte[] bytes,
int offset)
public static int byteArrayToIntLittleEndian(byte[] bytes,
int offset)
public static long byteArrayToLong(byte[] bytes)
public static long byteArray4ToLong(byte[] bytes,
int offset)
public static long byteArray5ToLong(byte[] bytes,
int offset)
public static long byteArrayToLong(byte[] bytes,
int offset)