public class BytesUtil extends Object
| 构造器和说明 |
|---|
BytesUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
buff2int(byte[] bs,
int offset)
buff convert to int
|
static long |
buff2long(byte[] bs,
int offset)
buff convert to long
|
static byte[] |
long2buff(long n)
long convert to buff (big-endian)
|
static byte[] |
objString2Byte(String value,
Charset charset)
将String转换为byte
|
static byte[] |
objString2Byte(String value,
int max,
Charset charset)
将String转换为byte
|
public static byte[] long2buff(long n)
n - long numberpublic static long buff2long(byte[] bs,
int offset)
bs - the buffer (big-endian)offset - the start position based 0public static int buff2int(byte[] bs,
int offset)
bs - the buffer (big-endian)offset - the start position based 0public static byte[] objString2Byte(String value, int max, Charset charset)
Copyright © 2020. All rights reserved.