mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 打印日志
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.common.util;
|
||||
import com.google.common.primitives.Bytes;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -143,6 +144,15 @@ public class BytesUtil {
|
||||
return new BigInteger(1, bytes).toString(radix);// 这里的1代表正数
|
||||
}
|
||||
|
||||
/**
|
||||
* 将byte[]转为十六进制的字符串
|
||||
* @param bytes byte[]
|
||||
* @return 转换后的字符串
|
||||
*/
|
||||
public static String printHexBinary(byte[] bytes) {
|
||||
return DatatypeConverter.printHexBinary(bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @函数功能: BCD码转为10进制串(阿拉伯数据)
|
||||
* @输入参数: BCD码
|
||||
|
||||
Reference in New Issue
Block a user