public class BytesHelper
extends java.lang.Object
| 构造器和说明 |
|---|
BytesHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
appendByte(byte[] bytes,
byte b) |
static byte[] |
appendBytes(byte[] bt1,
byte[] bt2) |
static java.lang.String |
bigDecimal2HexStr(java.math.BigDecimal bigDecimal,
int multiplyCount)
BigDecimal转16进制字符串(包含0x)
|
static byte[] |
bigIntegerToBytes(java.math.BigInteger value) |
static byte[] |
bigIntegerToBytes(java.math.BigInteger b,
int numBytes) |
static com.google.protobuf.ByteString |
bigIntegerToByteString(java.math.BigInteger value) |
static int |
byteArrayToInt(byte[] b) |
static java.math.BigDecimal |
hexStr2BigDecimal(java.lang.String hexValue,
int divideCount,
int resultPrecision)
16进制字符串转BigDecimal
|
static byte[] |
hexStringToBytes(java.lang.String data) |
static byte[] |
intToBytes(int val) |
static byte[] |
merge(byte[]... arrays) |
static java.lang.String |
oneByteToHexString(byte value) |
static java.lang.String |
toHexString(byte[] data) |
public static byte[] appendByte(byte[] bytes,
byte b)
public static byte[] appendBytes(byte[] bt1,
byte[] bt2)
public static byte[] bigIntegerToBytes(java.math.BigInteger b,
int numBytes)
public static byte[] bigIntegerToBytes(java.math.BigInteger value)
public static java.lang.String oneByteToHexString(byte value)
public static java.lang.String toHexString(byte[] data)
public static byte[] hexStringToBytes(java.lang.String data)
public static byte[] intToBytes(int val)
public static int byteArrayToInt(byte[] b)
public static byte[] merge(byte[]... arrays)
arrays - - arrays to mergepublic static com.google.protobuf.ByteString bigIntegerToByteString(java.math.BigInteger value)
public static java.math.BigDecimal hexStr2BigDecimal(java.lang.String hexValue,
int divideCount,
int resultPrecision)
hexValue - 16进制数据(包含0x)divideCount - 扣减精度 18resultPrecision - 结果精度设定public static java.lang.String bigDecimal2HexStr(java.math.BigDecimal bigDecimal,
int multiplyCount)
bigDecimal - multiplyCount - 增加精度 18