public class ByteUtil extends Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
EMPTY |
Constructor and Description |
---|
ByteUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
combine(byte[] first,
byte[] second) |
static byte[] |
combine(byte[] first,
int firstOffset,
int firstLength,
byte[] second,
int secondOffset,
int secondLength) |
static byte[] |
convertBitStringToFastByteArray(String bitString) |
static String |
convertByteArrayToBitString(byte[] bytes) |
static String |
convertByteArrayToBitString(byte[] bytes,
int length) |
static String |
convertByteArrayToHexString(byte[] value) |
static byte[] |
convertHexStringToByteArray(String hexString) |
static InputStream |
createByteStream(String bitString) |
static InputStream |
createByteStreamFromHexBytes(String hexString) |
static boolean |
isEmpty(byte[] bytes) |
public static byte[] convertBitStringToFastByteArray(String bitString)
bitString
- in the format of space separated 8-bit bytes (i.e. "01010101
10101010")public static byte[] convertHexStringToByteArray(String hexString)
public static String convertByteArrayToHexString(byte[] value)
public static String convertByteArrayToBitString(byte[] bytes)
bytes
- byte arraypublic static String convertByteArrayToBitString(byte[] bytes, int length)
public static InputStream createByteStream(String bitString)
public static InputStream createByteStreamFromHexBytes(String hexString)
public static byte[] combine(byte[] first, byte[] second)
public static boolean isEmpty(byte[] bytes)
public static byte[] combine(byte[] first, int firstOffset, int firstLength, byte[] second, int secondOffset, int secondLength)
Copyright © 2006-2013 The LaSalle Technology Group, LLC. All Rights Reserved.