public class ByteUtils extends Object
| 构造器和说明 |
|---|
ByteUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
Bytes4ToInt(byte[] abyte0)
4 bytes to integer
|
static long |
Bytes8ToLong(byte[] abyte0)
8 bytes to long
|
static void |
bytesCopy(byte[] srcAbyte,
byte[] destAbyte,
int srcFrom,
int srcTo,
int destFrom) |
static int |
BytesToInt(byte[] abyte0)
byte to integer
|
static String |
byteToHexString(byte[] b,
String charset)
字节数组转换成16进制可打印字符串
|
static int |
byteToInt(byte byte0)
byte to integer
|
static byte |
intToByte(int i) |
static byte[] |
intToBytes(int i) |
static void |
intToBytes(int i,
byte[] abyte0) |
static byte[] |
intToBytes4(int i) |
static void |
intToBytes4(int i,
byte[] abyte0) |
static byte[] |
longToBytes8(long i) |
static String |
toPrintableString(byte[] b)
to protableString
|
public static byte intToByte(int i)
i - public static byte[] intToBytes(int i)
i - public static void intToBytes(int i,
byte[] abyte0)
i - abyte0 - public static byte[] intToBytes4(int i)
i - public static void intToBytes4(int i,
byte[] abyte0)
i - abyte0 - public static byte[] longToBytes8(long i)
i - public static int byteToInt(byte byte0)
byte0 - public static int BytesToInt(byte[] abyte0)
abyte0 - public static int Bytes4ToInt(byte[] abyte0)
abyte0 - public static long Bytes8ToLong(byte[] abyte0)
abyte0 - public static void bytesCopy(byte[] srcAbyte,
byte[] destAbyte,
int srcFrom,
int srcTo,
int destFrom)
srcAbyte - destAbyte - srcFrom: - srcindexsrcTo - destFrom - public static String byteToHexString(byte[] b, String charset)
b - charset - public static String toPrintableString(byte[] b)
b - Copyright © 2019. All rights reserved.