public class ByteUtils extends Object
| 构造器和说明 |
|---|
ByteUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decodeAscii(byte[] data,
int offset,
int length,
boolean msbFirst)
ASCII字符串的解码
|
static int |
decodeInt16(byte[] data)
对16位长度byte[],进行int解码
|
static int |
decodeInt16(byte[] data,
boolean msbFirst)
对16位长度byte[],进行int解码
|
static int |
decodeInt16(byte[] data,
int offset,
boolean msbFirst)
对16位长度byte[],进行int解码
|
static long |
decodeInt32(byte[] data)
对32位长度byte[],进行int解码
|
static long |
decodeInt32(byte[] data,
boolean msbFirst)
对32位长度byte[],进行int解码
|
static long |
decodeInt32(byte[] data,
int offset,
boolean msbFirst)
对32位长度byte[],进行int解码
|
static void |
encodeAscii(String str,
byte[] data,
int offset,
int length,
boolean msbFirst) |
static void |
encodeInt16(int value,
byte[] data,
int offset,
boolean msbFirst) |
static void |
encodeInt32(long value,
byte[] data,
int offset,
boolean msbFirst) |
public static void encodeInt32(long value,
byte[] data,
int offset,
boolean msbFirst)
public static void encodeInt16(int value,
byte[] data,
int offset,
boolean msbFirst)
public static int decodeInt16(byte[] data,
int offset,
boolean msbFirst)
data - 数组offset - 偏移量msbFirst - 高位在前public static int decodeInt16(byte[] data,
boolean msbFirst)
data - 数组msbFirst - 高位在前public static int decodeInt16(byte[] data)
data - 数组public static long decodeInt32(byte[] data,
int offset,
boolean msbFirst)
data - 数组offset - 偏移量msbFirst - 高位在前public static long decodeInt32(byte[] data,
boolean msbFirst)
data - 数组msbFirst - 高位在前public static long decodeInt32(byte[] data)
data - 数组public static String decodeAscii(byte[] data, int offset, int length, boolean msbFirst)
data - 数据块offset - 起始位置length - 长度msbFirst - 是否高位在前public static void encodeAscii(String str, byte[] data, int offset, int length, boolean msbFirst)
Copyright © 2024. All rights reserved.