public class ByteReadBuff extends ByteBuffBase
| 构造器和说明 |
|---|
ByteReadBuff(byte[] data)
构造方法
|
ByteReadBuff(byte[] data,
boolean littleEndian) |
ByteReadBuff(byte[] data,
EByteBuffFormat format) |
ByteReadBuff(byte[] data,
int offset) |
ByteReadBuff(byte[] data,
int offset,
boolean littleEndian,
EByteBuffFormat format) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getBitToInt(int index,
int bit)
获取一位的int值数据
|
boolean |
getBoolean(int bit)
获取boolean类型数据
|
boolean |
getBoolean(int index,
int bit)
获取boolean数据
|
byte |
getByte()
获取1个字节数据
|
byte |
getByte(int index)
获取字节数据
|
byte[] |
getBytes()
获取剩余所有字节
|
byte[] |
getBytes(int length)
获取字节数组数据
|
byte[] |
getBytes(int index,
int length)
获取字节数组数据
|
int |
getByteToInt()
获取1个字节的整形数据
|
int |
getByteToInt(int index)
获取一个字节的整形数据
|
int |
getByteToInt(int index,
int startBitIndex,
int bitLength)
获取一个字节中几个位组合而成的数据
|
float |
getFloat32()
获取float32数据
|
float |
getFloat32(int index)
获取float32数据
|
double |
getFloat64()
获取float64数据
|
double |
getFloat64(int index)
获取float64数据
|
short |
getInt16()
获取int16数据
|
short |
getInt16(int index)
获取int16数据
|
int |
getInt32()
获取int32数据
|
int |
getInt32(int index)
获取int32数据
|
int |
getRemainSize()
获取剩余字节数量
|
String |
getString(int length)
获取字符串数据
|
String |
getString(int length,
Charset charset)
获取字符串数据
|
String |
getString(int index,
int length)
获取字符串
|
String |
getString(int index,
int length,
Charset charset)
获取字符串
|
int |
getUInt16()
获取uint16数据
|
int |
getUInt16(int index)
获取uint16数据
|
long |
getUInt32()
获取uint32数据
|
long |
getUInt32(int index)
获取uint32数据
|
static ByteReadBuff |
newInstance(byte[] data) |
static ByteReadBuff |
newInstance(byte[] data,
boolean littleEndian) |
static ByteReadBuff |
newInstance(byte[] data,
EByteBuffFormat format) |
static ByteReadBuff |
newInstance(byte[] data,
int offset) |
static ByteReadBuff |
newInstance(byte[] data,
int offset,
boolean littleEndian,
EByteBuffFormat format) |
reorderByFormatIn4Bytes, reorderByFormatIn4Bytes, reorderByFormatIn8Bytes, reorderByFormatIn8Bytespublic ByteReadBuff(byte[] data)
data - 字节数组public ByteReadBuff(byte[] data,
int offset)
public ByteReadBuff(byte[] data,
EByteBuffFormat format)
public ByteReadBuff(byte[] data,
boolean littleEndian)
public ByteReadBuff(byte[] data,
int offset,
boolean littleEndian,
EByteBuffFormat format)
public static ByteReadBuff newInstance(byte[] data)
public static ByteReadBuff newInstance(byte[] data, int offset)
public static ByteReadBuff newInstance(byte[] data, boolean littleEndian)
public static ByteReadBuff newInstance(byte[] data, EByteBuffFormat format)
public static ByteReadBuff newInstance(byte[] data, int offset, boolean littleEndian, EByteBuffFormat format)
public int getRemainSize()
public boolean getBoolean(int bit)
bit - 位地址public byte getByte()
public byte[] getBytes()
public byte[] getBytes(int length)
length - 长度public int getByteToInt()
public short getInt16()
public int getUInt16()
public int getInt32()
public long getUInt32()
public float getFloat32()
public double getFloat64()
public String getString(int length)
length - 字符串长度public String getString(int length, Charset charset)
length - 字符串长度charset - 字符集public boolean getBoolean(int index,
int bit)
index - 索引bit - 位public int getBitToInt(int index,
int bit)
index - 索引bit - 位public byte getByte(int index)
index - 索引public byte[] getBytes(int index,
int length)
index - 索引length - 长度public int getByteToInt(int index)
index - 索引public int getByteToInt(int index,
int startBitIndex,
int bitLength)
index - 字节索引startBitIndex - 起始位索引bitLength - 位长度public short getInt16(int index)
index - 索引public int getUInt16(int index)
index - 索引public int getInt32(int index)
index - 索引public long getUInt32(int index)
index - 索引public float getFloat32(int index)
index - 索引public double getFloat64(int index)
index - 索引public String getString(int index, int length)
index - 索引length - 长度Copyright © 2024. All rights reserved.