public class ArraySupport
extends java.lang.Object
| 构造器和说明 |
|---|
ArraySupport() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
bitCheck(byte[] bits,
int index)
return
true if bit specialized by index in byte array bits is 1,otherwise false |
static boolean |
bitCheck(java.lang.String hex,
int index)
return
true if bit specialized by index in HEX string
hex is 1, otherwise false return false if index is null or out of range |
static byte[] |
bitReset(byte[] bits,
int index)
set bit specialized by
index in byte array bits to 0 |
static byte[] |
bitSet(byte[] bits,
int index)
set bit specialized by
index in byte array bits to 1 |
static byte[] |
bitSet(byte[] bits,
int index,
boolean set1)
set bit specialized by
index in byte array bits to 0 if set1 is true,otherwise set to 0 |
static void |
copyToByteArray(java.lang.String hex,
byte[] dest)
cast HEX string to byte array,copy to this destination,same length required with
dest |
static byte[] |
fromHex(java.lang.String input)
cast HEX string to byte array
|
static java.lang.String |
toHex(byte[] input)
cast byte array to HEX string
|
static java.lang.String |
toHex(java.lang.Number input)
cast integral Number to HEX string
|
static java.lang.String |
toHex(java.lang.Object input)
cast byte array or number to HEX string
|
public static final java.lang.String toHex(byte[] input)
input - public static final java.lang.String toHex(java.lang.Number input)
input - public static final java.lang.String toHex(java.lang.Object input)
input - public static final byte[] fromHex(java.lang.String input)
input - null if input is nullpublic static void copyToByteArray(java.lang.String hex,
byte[] dest)
desthex - dest - public static final boolean bitCheck(byte[] bits,
int index)
true if bit specialized by index in byte array bits is 1,otherwise falsebits - index - public static final boolean bitCheck(java.lang.String hex,
int index)
true if bit specialized by index in HEX string
hex is 1, otherwise false false if index is null or out of rangehex - index - public static final byte[] bitSet(byte[] bits,
int index)
index in byte array bits to 1bits - index - bitspublic static final byte[] bitReset(byte[] bits,
int index)
index in byte array bits to 0bits - index - bitspublic static final byte[] bitSet(byte[] bits,
int index,
boolean set1)
index in byte array bits to 0 if set1 is true,otherwise set to 0bits - index - set1 - bitsCopyright © 2025. All Rights Reserved.