public class ByteWriteBuff extends ByteBuffBase
| 构造器和说明 |
|---|
ByteWriteBuff(int capacity)
构造方法
|
ByteWriteBuff(int capacity,
boolean littleEndian,
EByteBuffFormat format) |
ByteWriteBuff(int capacity,
EByteBuffFormat format) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte |
getByte(int index)
获取指定索引的字节
|
static ByteWriteBuff |
newInstance(int capacity) |
static ByteWriteBuff |
newInstance(int capacity,
boolean littleEndian) |
static ByteWriteBuff |
newInstance(int capacity,
boolean littleEndian,
EByteBuffFormat format) |
static ByteWriteBuff |
newInstance(int capacity,
EByteBuffFormat format) |
ByteWriteBuff |
putByte(byte src)
添加字节数据
|
ByteWriteBuff |
putByte(byte src,
int desIndex) |
ByteWriteBuff |
putByte(int src)
添加int类型单字节数据
|
ByteWriteBuff |
putBytes(byte[] src)
添加字节数组数据
|
ByteWriteBuff |
putBytes(byte[] src,
int srcIndex)
添加字节数组数据
|
ByteWriteBuff |
putBytes(byte[] src,
int srcIndex,
int desIndex)
添加字节数组数据,当desIndex==this.offset时,才将this.offset进行偏移,否则保持不变
|
ByteWriteBuff |
putDouble(double src)
添加double数据
|
ByteWriteBuff |
putDouble(double src,
int desIndex)
添加double数据
|
ByteWriteBuff |
putDouble(double src,
int desIndex,
boolean littleEndian)
添加double数据
|
ByteWriteBuff |
putFloat(float src)
添加float数据
|
ByteWriteBuff |
putFloat(float src,
int desIndex)
添加float数据
|
ByteWriteBuff |
putFloat(float src,
int desIndex,
boolean littleEndian)
添加float数据
|
ByteWriteBuff |
putInteger(int src)
添加integer数据
|
ByteWriteBuff |
putInteger(int src,
int desIndex)
添加Integer数据
|
ByteWriteBuff |
putInteger(int src,
int desIndex,
boolean littleEndian)
添加integer数据
|
ByteWriteBuff |
putInteger(long src)
添加integer数据
|
ByteWriteBuff |
putInteger(long src,
int desIndex)
添加Integer数据
|
ByteWriteBuff |
putInteger(long src,
int desIndex,
boolean littleEndian)
添加integer数据
|
ByteWriteBuff |
putLong(long src)
添加long数据
|
ByteWriteBuff |
putLong(long src,
int desIndex)
添加long数据
|
ByteWriteBuff |
putLong(long src,
int desIndex,
boolean littleEndian)
添加long数据
|
ByteWriteBuff |
putShort(int src)
添加short数据
|
ByteWriteBuff |
putShort(int src,
int desIndex)
添加short数据
|
ByteWriteBuff |
putShort(int src,
int desIndex,
boolean littleEndian)
添加short数据
|
ByteWriteBuff |
putShort(short src)
添加short数据
|
ByteWriteBuff |
putShort(short src,
int desIndex)
添加short数据
|
ByteWriteBuff |
putShort(short src,
int desIndex,
boolean littleEndian)
添加short数据
|
ByteWriteBuff |
putString(String src)
添加string数据
|
ByteWriteBuff |
putString(String src,
Charset charsets)
添加string数据
|
ByteWriteBuff |
putString(String src,
Charset charsets,
int desIndex)
添加字符串
|
reorderByFormatIn4Bytes, reorderByFormatIn4Bytes, reorderByFormatIn8Bytes, reorderByFormatIn8Bytespublic ByteWriteBuff(int capacity)
capacity - 容量public ByteWriteBuff(int capacity,
EByteBuffFormat format)
public ByteWriteBuff(int capacity,
boolean littleEndian,
EByteBuffFormat format)
public static ByteWriteBuff newInstance(int capacity)
public static ByteWriteBuff newInstance(int capacity, EByteBuffFormat format)
public static ByteWriteBuff newInstance(int capacity, boolean littleEndian)
public static ByteWriteBuff newInstance(int capacity, boolean littleEndian, EByteBuffFormat format)
public byte getByte(int index)
index - 索引public ByteWriteBuff putByte(byte src)
src - 数据源public ByteWriteBuff putByte(byte src, int desIndex)
public ByteWriteBuff putByte(int src)
src - 数据源public ByteWriteBuff putBytes(byte[] src)
src - 数据源public ByteWriteBuff putBytes(byte[] src, int srcIndex)
src - 数据源srcIndex - 起始索引public ByteWriteBuff putBytes(byte[] src, int srcIndex, int desIndex)
src - 数据源srcIndex - 起始索引desIndex - 目标索引public ByteWriteBuff putShort(short src)
src - 数据源public ByteWriteBuff putShort(short src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putShort(int src)
src - 数据源public ByteWriteBuff putShort(int src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putInteger(int src)
src - 数据源public ByteWriteBuff putInteger(int src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putInteger(long src)
src - 数据源public ByteWriteBuff putInteger(long src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putLong(long src)
src - 数据源public ByteWriteBuff putLong(long src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putFloat(float src)
src - 数据源public ByteWriteBuff putFloat(float src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putDouble(double src)
src - 数据源public ByteWriteBuff putDouble(double src, int desIndex)
src - 数据源desIndex - 目标索引public ByteWriteBuff putString(String src)
src - 数据源public ByteWriteBuff putString(String src, Charset charsets)
src - 数据源charsets - 字符集类型public ByteWriteBuff putShort(short src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putShort(int src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putInteger(int src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putInteger(long src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putLong(long src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putFloat(float src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putDouble(double src, int desIndex, boolean littleEndian)
src - 数据源desIndex - 目标索引littleEndian - 是否小端模式public ByteWriteBuff putString(String src, Charset charsets, int desIndex)
src - 数据源charsets - 字符集desIndex - 目标索引Copyright © 2024. All rights reserved.