package org.yzh.commons.util;
|
|
import org.apache.commons.codec.binary.Hex;
|
|
import java.io.PrintWriter;
|
import java.io.StringWriter;
|
import java.math.BigInteger;
|
import java.util.*;
|
|
/**
|
* @author yezhihao
|
* https://gitee.com/yezhihao/jt808-server
|
*/
|
public class Byte2NumberUtils {
|
public static Integer bytesToInteger(byte[] bArray) {
|
try {
|
return Integer.valueOf(Hex.encodeHexString(bArray),16) ;
|
}catch (Exception e){
|
return null;
|
}
|
}
|
}
|