public class BcdUtils extends Object
| 构造器和说明 |
|---|
BcdUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
bcd2int(byte bcd) |
static String |
bcd2str(byte[] bcd)
BCD格式的字节数组解成数字字符串
|
static String |
bcd2str(byte[] data,
int offset,
int length,
boolean bigEndian)
转BCD编码
|
static byte[] |
str2bcd(String bcd,
boolean bigEndian)
数字字符串编成BCD格式字节数组
|
static void |
str2bcd(String bcd,
byte[] bcdByte,
int offset,
boolean bigEndian) |
public static void str2bcd(String bcd, byte[] bcdByte, int offset, boolean bigEndian)
public static byte[] str2bcd(String bcd, boolean bigEndian)
bcd - 数据bigEndian - 大端模式public static String bcd2str(byte[] bcd)
bcd - 字节数组public static String bcd2str(byte[] data, int offset, int length, boolean bigEndian)
data - 数据块offset - 偏移量length - 长度bigEndian - 是否为大端模式public static int bcd2int(byte bcd)
Copyright © 2024. All rights reserved.