public class ByteUtils extends Object
| 构造器和说明 |
|---|
ByteUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
bcd(byte[] src,
int from,
int to) |
static int |
countOf(byte[] arr,
byte target) |
static boolean |
equals(byte[] arr1,
byte[] arr2) |
static byte[] |
hexToBytes(String hexContent) |
static int |
indexOf(byte[] arr,
byte target,
int from,
int to)
寻找目标字节在字节数组中的下标
|
static byte[] |
join(byte[]... arrs) |
static byte[] |
join(byte hyphen,
byte[]... arrs) |
static void |
main(String[] args) |
static byte[][] |
split(byte[] arr,
byte separator) |
static byte[] |
subArray(byte[] arr,
int from) |
static byte[] |
subArray(byte[] arr,
int from,
int to) |
static byte[] |
trim(byte[] src,
byte empty) |
static byte[] |
trim(byte[] src,
byte empty,
int from,
int to) |
static int |
unsigned(byte value) |
static int |
xor(byte[] bytes)
异或值,返回
|
public static int unsigned(byte value)
public static boolean equals(byte[] arr1,
byte[] arr2)
public static byte[][] split(byte[] arr,
byte separator)
public static int indexOf(byte[] arr,
byte target,
int from,
int to)
arr - 数组target - 目标字节from - 检索开始下标(包含)to - 检索结束下标(不包含)public static int countOf(byte[] arr,
byte target)
public static byte[] subArray(byte[] arr,
int from)
public static byte[] subArray(byte[] arr,
int from,
int to)
public static byte[] join(byte hyphen,
byte[]... arrs)
public static byte[] join(byte[]... arrs)
public static byte[] trim(byte[] src,
byte empty)
public static byte[] trim(byte[] src,
byte empty,
int from,
int to)
public static String bcd(byte[] src, int from, int to)
public static int xor(byte[] bytes)
bytes - 数组public static byte[] hexToBytes(String hexContent)
public static void main(String[] args)
Copyright © 2024. All rights reserved.