public class BitUtil extends Object
| 构造器和说明 |
|---|
BitUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
bits2Bytes(int[] bits)
bit数组转为byte数组
|
static int[] |
getBitByte(byte b)
byte转为bit数组
|
static int[] |
getBitBytes(byte[] bytes)
byte数组转为bit数组
|
static int |
getBitValue(int[] bits,
int startIndex,
int endIndex)
获取二进制位值,前闭后闭
|
static void |
setBitValue(int[] bits,
int startIndex,
int endIndex,
int value)
设置二进制位,前闭后闭
|
public static int[] getBitByte(byte b)
public static int[] getBitBytes(byte[] bytes)
public static int getBitValue(int[] bits,
int startIndex,
int endIndex)
public static byte[] bits2Bytes(int[] bits)
public static void setBitValue(int[] bits,
int startIndex,
int endIndex,
int value)
Copyright © 2022. All rights reserved.