jiangping
2025-02-14 e3067f58cce422bbd26a7729bf59f5f4f34a530f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
        }
    }
}