public class DigitTools extends Object
| 构造器和说明 |
|---|
DigitTools() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte |
hex2Byte(char ch)
把单个十六进制'0'-'F'字符转为字节
|
static byte |
hex2Byte(String hexStr)
十六进制字符转为byte
如:"BC" >> 188 >> -68
|
static byte[] |
hex2Bytes(String hexStr)
十六进制字符串转为二进制字节码流
|
static int |
hex2Dec(char ch)
把单个十六进制0-F字符转为10进制
如:'A' >> 10
|
static int |
hex2Dec(String hex)
十六进制转为10进制
如:"BC" >> 188
|
static String |
hex2Temperature(String str)
根据2位16进制字符串解析温度值
|
static String[] |
toHex(byte[] data)
二进制字节码流转为十六进制字符串数组
|
static String[] |
toHex(byte[] data,
int begin,
int end)
二进制字节码流转为十六进制字符数组
|
static String |
toHexStr(byte b)
二进制字节转为十六进制字符串
如:-68 >> 188 >> "BC"
|
static String |
toHexStr(byte[] data)
二进制字节码流转为十六进制字符串
|
static String |
toHexStr(byte[] data,
int begin,
int end)
二进制字节码流转为十六进制字符串
|
static String |
toHexStr(int i)
10进制转为十六进制
如:188 >> "BC"
|
static byte |
xorCheck(byte[] arr)
异或校验运算
|
public static int hex2Dec(char ch)
如:'A' >> 10
public static int hex2Dec(String hex)
如:"BC" >> 188
public static byte hex2Byte(char ch)
public static byte hex2Byte(String hexStr)
如:"BC" >> 188 >> -68
public static String toHexStr(int i)
如:188 >> "BC"
public static String toHexStr(byte b)
如:-68 >> 188 >> "BC"
public static String[] toHex(byte[] data)
public static String[] toHex(byte[] data, int begin, int end)
public static String toHexStr(byte[] data)
public static String toHexStr(byte[] data, int begin, int end)
public static byte[] hex2Bytes(String hexStr)
public static byte xorCheck(byte[] arr)
Copyright © 2024. All rights reserved.