- java.lang.Object
-
- org.redkale.util.ByteBufferWriter
-
public class ByteBufferWriter extends Object
以ByteBuffer为数据载体的Writer详情见: https://redkale.org
- 作者:
- zhangjx
-
-
构造器概要
构造器 限定符 构造器 说明 protected
ByteBufferWriter(Supplier<ByteBuffer> supplier)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static ByteBufferWriter
create(Supplier<ByteBuffer> supplier)
static ByteBufferWriter
create(Supplier<ByteBuffer> supplier, ByteBuffer one)
int
getWriteBytesCounter()
int
position()
ByteBufferWriter
put(byte b)
int
put(byte[] src)
int
put(byte[] src, int offset, int length)
int
put(byte[] src, int offset, int length, byte[] src2, int offset2, int length2)
ByteBufferWriter
putDouble(double value)
ByteBufferWriter
putFloat(float value)
ByteBufferWriter
putInt(int value)
ByteBufferWriter
putInt(int index, int value)
ByteBufferWriter
putLong(long value)
ByteBufferWriter
putShort(short value)
ByteBuffer[]
toBuffers()
static ByteBuffer[]
toBuffers(Supplier<ByteBuffer> supplier, byte[] content)
static ByteBuffer[]
toBuffers(Supplier<ByteBuffer> supplier, byte[] content, int offset, int length)
-
-
-
构造器详细资料
-
ByteBufferWriter
protected ByteBufferWriter(Supplier<ByteBuffer> supplier)
-
-
方法详细资料
-
create
public static ByteBufferWriter create(Supplier<ByteBuffer> supplier)
-
create
public static ByteBufferWriter create(Supplier<ByteBuffer> supplier, ByteBuffer one)
-
toBuffers
public static ByteBuffer[] toBuffers(Supplier<ByteBuffer> supplier, byte[] content)
-
toBuffers
public static ByteBuffer[] toBuffers(Supplier<ByteBuffer> supplier, byte[] content, int offset, int length)
-
toBuffers
public ByteBuffer[] toBuffers()
-
position
public int position()
-
put
public ByteBufferWriter put(byte b)
-
putShort
public ByteBufferWriter putShort(short value)
-
putInt
public ByteBufferWriter putInt(int value)
-
putInt
public ByteBufferWriter putInt(int index, int value)
-
putFloat
public ByteBufferWriter putFloat(float value)
-
putLong
public ByteBufferWriter putLong(long value)
-
putDouble
public ByteBufferWriter putDouble(double value)
-
put
public int put(byte[] src)
-
put
public int put(byte[] src, int offset, int length)
-
put
public int put(byte[] src, int offset, int length, byte[] src2, int offset2, int length2)
-
getWriteBytesCounter
public int getWriteBytesCounter()
-
-