public class ByteUtil extends Object
| Constructor and Description |
|---|
ByteUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getBitValue(byte b,
int position,
boolean isBigEndian) |
static boolean |
getBitValueBigEndian(byte b,
int position) |
static byte[] |
getByteArrayData(InputStream stream) |
static byte[] |
getDecompressedData(byte[] compressedData) |
static int |
getNumberOfBits(int i) |
static int |
getValueOfBits(byte b,
int minBitPosition,
int maxBitPosition) |
static byte[] |
readByteArray(InputStream in,
int length) |
static void |
readStream(InputStream stream) |
static byte |
setBitValue(byte b,
int position,
boolean value,
boolean isBigEndian) |
static byte |
setBitValueBigEndian(byte b,
int position,
boolean value) |
static byte |
setBitValues(byte b,
int beginning,
int end,
int value) |
static byte |
setBitValuesBigEndian(byte b,
int beginning,
int end,
int value) |
public static byte[] readByteArray(InputStream in, int length) throws IOException
IOExceptionpublic static byte[] getByteArrayData(InputStream stream) throws IOException
IOExceptionpublic static void readStream(InputStream stream) throws IOException
IOExceptionpublic static byte[] getDecompressedData(byte[] compressedData)
throws IOException
IOExceptionpublic static int getValueOfBits(byte b,
int minBitPosition,
int maxBitPosition)
public static boolean getBitValueBigEndian(byte b,
int position)
public static boolean getBitValue(byte b,
int position,
boolean isBigEndian)
public static byte setBitValue(byte b,
int position,
boolean value,
boolean isBigEndian)
public static byte setBitValueBigEndian(byte b,
int position,
boolean value)
public static byte setBitValues(byte b,
int beginning,
int end,
int value)
public static byte setBitValuesBigEndian(byte b,
int beginning,
int end,
int value)
public static int getNumberOfBits(int i)
Copyright © 2022. All Rights Reserved.