public interface BytesBuff
| 限定符和类型 | 方法和说明 |
|---|---|
int |
capacity()
当前容量
|
void |
clear()
清理缓冲区
|
BytesBuff |
copy()
复制可读内容为一个缓冲区
|
BytesBuff |
copy(int index,
int length)
复制指定区块为一个缓冲区
|
boolean |
getBoolean(int index) |
byte |
getByte(int index) |
byte[] |
getBytes()
获取写入的字节数组(0~writeIndex)
|
BytesBuff |
getBytes(int index,
byte[] dst) |
BytesBuff |
getBytes(int index,
byte[] dst,
int dstIndex,
int length) |
BytesBuff |
getBytes(int index,
BytesBuff dst) |
BytesBuff |
getBytes(int index,
BytesBuff dst,
int length) |
BytesBuff |
getBytes(int index,
BytesBuff dst,
int dstIndex,
int length) |
BytesBuff |
getBytes(int index,
OutputStream out,
int length) |
char |
getChar(int index) |
double |
getDouble(int index) |
float |
getFloat(int index) |
int |
getInt(int index) |
int |
getIntLE(int index) |
long |
getLong(int index) |
long |
getLongLE(int index) |
int |
getMedium(int index) |
int |
getMediumLE(int index) |
byte[] |
getRawBytes()
获取全部字节数组
|
byte[] |
getReadableBytes()
获取可读取的字节数组(readIndex~writeIndex)
|
short |
getShort(int index) |
short |
getShortLE(int index) |
short |
getUnsignedByte(int index) |
long |
getUnsignedInt(int index) |
long |
getUnsignedIntLE(int index) |
int |
getUnsignedMedium(int index) |
int |
getUnsignedMediumLE(int index) |
int |
getUnsignedShort(int index) |
int |
getUnsignedShortLE(int index) |
int |
length()
有效数据长度 写入长度
|
BytesBuff |
markReaderIndex()
标记读索引
|
BytesBuff |
markWriterIndex()
标记写索引
|
int |
readableBytes()
可读字节数
|
boolean |
readBoolean() |
byte |
readByte() |
BytesBuff |
readBytes(byte[] dst) |
BytesBuff |
readBytes(byte[] dst,
int dstIndex,
int length) |
BytesBuff |
readBytes(BytesBuff dst) |
BytesBuff |
readBytes(BytesBuff dst,
int length) |
BytesBuff |
readBytes(BytesBuff dst,
int dstIndex,
int length) |
BytesBuff |
readBytes(int length) |
BytesBuff |
readBytes(OutputStream out,
int length) |
char |
readChar() |
double |
readDouble() |
int |
readerIndex()
读索引
|
BytesBuff |
readerIndex(int readerIndex)
设置读索引
|
float |
readFloat() |
int |
readInt() |
int |
readIntLE() |
long |
readLong() |
long |
readLongLE() |
int |
readMedium() |
int |
readMediumLE() |
short |
readShort() |
short |
readShortLE() |
short |
readUnsignedByte() |
long |
readUnsignedInt() |
long |
readUnsignedIntLE() |
int |
readUnsignedMedium() |
int |
readUnsignedMediumLE() |
int |
readUnsignedShort() |
int |
readUnsignedShortLE() |
void |
reset()
重置缓冲区,使得可以重读
|
BytesBuff |
resetReaderIndex()
重置读索引
|
BytesBuff |
resetWriterIndex()
重置写索引
|
BytesBuff |
setBoolean(int index,
boolean value) |
BytesBuff |
setByte(int index,
int value) |
BytesBuff |
setBytes(int index,
byte[] src) |
BytesBuff |
setBytes(int index,
byte[] src,
int srcIndex,
int length) |
BytesBuff |
setBytes(int index,
BytesBuff src) |
BytesBuff |
setBytes(int index,
BytesBuff src,
int length) |
BytesBuff |
setBytes(int index,
BytesBuff src,
int srcIndex,
int length) |
int |
setBytes(int index,
InputStream in,
int length) |
BytesBuff |
setChar(int index,
int value) |
BytesBuff |
setDouble(int index,
double value) |
BytesBuff |
setFloat(int index,
float value) |
BytesBuff |
setIndex(int readerIndex,
int writerIndex)
设置读写索引
|
BytesBuff |
setInt(int index,
int value) |
BytesBuff |
setIntLE(int index,
int value) |
BytesBuff |
setLong(int index,
long value) |
BytesBuff |
setLongLE(int index,
long value) |
BytesBuff |
setMedium(int index,
int value) |
BytesBuff |
setMediumLE(int index,
int value) |
BytesBuff |
setShort(int index,
int value) |
BytesBuff |
setShortLE(int index,
int value) |
BytesBuff |
setZero(int index,
int length) |
BytesBuff |
skipBytes(int length) |
int |
writableBytes()
可写字节数
|
BytesBuff |
writeBoolean(boolean value) |
BytesBuff |
writeByte(int value) |
BytesBuff |
writeBytes(byte[] src) |
BytesBuff |
writeBytes(byte[] src,
int srcIndex,
int length) |
BytesBuff |
writeBytes(BytesBuff src) |
BytesBuff |
writeBytes(BytesBuff src,
int length) |
BytesBuff |
writeBytes(BytesBuff src,
int srcIndex,
int length) |
BytesBuff |
writeChar(int value) |
BytesBuff |
writeDouble(double value) |
BytesBuff |
writeFloat(float value) |
BytesBuff |
writeInt(int value) |
BytesBuff |
writeIntLE(int value) |
BytesBuff |
writeLong(long value) |
BytesBuff |
writeLongLE(long value) |
BytesBuff |
writeMedium(int value) |
BytesBuff |
writeMediumLE(int value) |
int |
writerIndex()
获取写索引
|
BytesBuff |
writerIndex(int writerIndex)
设置写索引
|
BytesBuff |
writeShort(int value) |
BytesBuff |
writeShortLE(int value) |
BytesBuff markReaderIndex()
BytesBuff resetReaderIndex()
BytesBuff markWriterIndex()
BytesBuff resetWriterIndex()
int readerIndex()
BytesBuff readerIndex(int readerIndex)
readerIndex - int writerIndex()
BytesBuff writerIndex(int writerIndex)
writerIndex - BytesBuff setIndex(int readerIndex, int writerIndex)
readerIndex - writerIndex - int readableBytes()
int writableBytes()
int capacity()
void clear()
void reset()
int length()
BytesBuff copy()
BytesBuff copy(int index, int length)
index - length - byte[] getBytes()
byte[] getReadableBytes()
byte[] getRawBytes()
boolean getBoolean(int index)
byte getByte(int index)
short getUnsignedByte(int index)
short getShort(int index)
short getShortLE(int index)
int getUnsignedShort(int index)
int getUnsignedShortLE(int index)
int getMedium(int index)
int getMediumLE(int index)
int getUnsignedMedium(int index)
int getUnsignedMediumLE(int index)
int getInt(int index)
int getIntLE(int index)
long getUnsignedInt(int index)
long getUnsignedIntLE(int index)
long getLong(int index)
long getLongLE(int index)
char getChar(int index)
float getFloat(int index)
double getDouble(int index)
BytesBuff getBytes(int index, byte[] dst)
BytesBuff getBytes(int index, byte[] dst, int dstIndex, int length)
BytesBuff getBytes(int index, OutputStream out, int length) throws IOException
IOExceptionBytesBuff setBoolean(int index, boolean value)
BytesBuff setByte(int index, int value)
BytesBuff setShort(int index, int value)
BytesBuff setShortLE(int index, int value)
BytesBuff setMedium(int index, int value)
BytesBuff setMediumLE(int index, int value)
BytesBuff setInt(int index, int value)
BytesBuff setIntLE(int index, int value)
BytesBuff setLong(int index, long value)
BytesBuff setLongLE(int index, long value)
BytesBuff setChar(int index, int value)
BytesBuff setFloat(int index, float value)
BytesBuff setDouble(int index, double value)
BytesBuff setBytes(int index, byte[] src)
BytesBuff setBytes(int index, byte[] src, int srcIndex, int length)
int setBytes(int index,
InputStream in,
int length)
throws IOException
IOExceptionBytesBuff setZero(int index, int length)
boolean readBoolean()
byte readByte()
short readUnsignedByte()
short readShort()
short readShortLE()
int readUnsignedShort()
int readUnsignedShortLE()
int readMedium()
int readMediumLE()
int readUnsignedMedium()
int readUnsignedMediumLE()
int readInt()
int readIntLE()
long readUnsignedInt()
long readUnsignedIntLE()
long readLong()
long readLongLE()
char readChar()
float readFloat()
double readDouble()
BytesBuff readBytes(int length)
BytesBuff readBytes(byte[] dst)
BytesBuff readBytes(byte[] dst, int dstIndex, int length)
BytesBuff readBytes(OutputStream out, int length) throws IOException
IOExceptionBytesBuff skipBytes(int length)
BytesBuff writeBoolean(boolean value)
BytesBuff writeByte(int value)
BytesBuff writeShort(int value)
BytesBuff writeShortLE(int value)
BytesBuff writeMedium(int value)
BytesBuff writeMediumLE(int value)
BytesBuff writeInt(int value)
BytesBuff writeIntLE(int value)
BytesBuff writeLong(long value)
BytesBuff writeLongLE(long value)
BytesBuff writeChar(int value)
BytesBuff writeFloat(float value)
BytesBuff writeDouble(double value)
BytesBuff writeBytes(byte[] src)
BytesBuff writeBytes(byte[] src, int srcIndex, int length)
Copyright © 2020. All rights reserved.