public class BCD extends Object
Constructor and Description |
---|
BCD() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
ascToBcd(byte[] ascii)
ASCII转BCD
|
static byte[] |
ascToBcd(byte[] ascii,
int ascLength)
ASCII转BCD
|
static String |
bcdToStr(byte[] bytes)
BCD转ASCII字符串
|
static byte[] |
strToBcd(String asc)
字符串转BCD码
|
public static byte[] strToBcd(String asc)
asc
- ASCII字符串public static byte[] ascToBcd(byte[] ascii)
ascii
- ASCII byte数组public static byte[] ascToBcd(byte[] ascii, int ascLength)
ascii
- ASCII byte数组ascLength
- 长度public static String bcdToStr(byte[] bytes)
bytes
- BCD byte数组Copyright © 2021. All rights reserved.