public class BitsUtils extends Object
| 构造器和说明 |
|---|
BitsUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static double |
bitsToDouble(byte[] bts)
8字节浮点数内存编码,转换为double
|
static double |
bitsToDouble(byte bts0,
byte bts1,
byte bts2,
byte bts3,
byte bts4,
byte bts5,
byte bts6,
byte bts7)
8字节浮点数内存编码,转换为double
|
static float |
bitsToFloat(byte[] bts)
4字节浮点数内存编码,转换为float
|
static float |
bitsToFloat(byte bts0,
byte bts1,
byte bts2,
byte bts3)
4字节浮点数内存编码,转换为float
|
static float |
bitsToFloat(int bits) |
static int |
bitsToInteger(byte[] bts)
4字节整数内存编码,转换为int
|
static float |
bitsToInteger(byte bts0,
byte bts1,
byte bts2,
byte bts3)
4字节整数内存编码,转换为int
|
public static int bitsToInteger(byte[] bts)
bts - 内存或者报文中的二进制数据编码信息public static float bitsToInteger(byte bts0,
byte bts1,
byte bts2,
byte bts3)
bts0 - bts0bts1 - bts1bts2 - bts2bts3 - bts3public static float bitsToFloat(byte[] bts)
bts - 内存或者报文中的二进制编码public static float bitsToFloat(byte bts0,
byte bts1,
byte bts2,
byte bts3)
bts0 - bts0bts1 - bts1bts2 - bts2bts3 - bts3public static float bitsToFloat(int bits)
public static double bitsToDouble(byte[] bts)
bts - btspublic static double bitsToDouble(byte bts0,
byte bts1,
byte bts2,
byte bts3,
byte bts4,
byte bts5,
byte bts6,
byte bts7)
bts0 - bts0bts1 - bts1bts2 - bts2bts3 - bts3bts4 - bts4bts5 - bts5bts6 - bts6bts7 - bts7Copyright © 2023. All rights reserved.