- java.lang.Object
-
- org.redkale.util.ByteBufferReader
-
public class ByteBufferReader extends Object
以ByteBuffer为数据载体的Reader
注意:最小可读空间至少是8详情见: https://redkale.org
- 作者:
- zhangjx
-
-
构造器概要
构造器 构造器 说明 ByteBufferReader(ByteBuffer buffer)
ByteBufferReader(ByteBuffer[] buffers)
ByteBufferReader(Collection<ByteBuffer> buffers)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 ByteBufferReader
append(ByteBuffer... buffs)
static ByteBufferReader
create(ByteBuffer buffer)
static ByteBufferReader
create(ByteBuffer[] buffers)
static ByteBufferReader
create(Collection<ByteBuffer> buffers)
byte
get()
ByteBufferReader
get(byte[] dst)
ByteBufferReader
get(byte[] dst, int offset, int length)
double
getDouble()
float
getFloat()
int
getInt()
long
getLong()
short
getShort()
boolean
hasRemaining()
static boolean
hasRemaining(ByteBuffer... buffers)
byte
preget()
int
remaining()
static int
remaining(ByteBuffer... buffers)
static int
remaining(ByteBuffer[] buffers, int offset, int length)
ByteBufferReader
skip(int size)
static byte[]
toBytes(ByteBuffer[] buffers)
-
-
-
构造器详细资料
-
ByteBufferReader
public ByteBufferReader(Collection<ByteBuffer> buffers)
-
ByteBufferReader
public ByteBufferReader(ByteBuffer[] buffers)
-
ByteBufferReader
public ByteBufferReader(ByteBuffer buffer)
-
-
方法详细资料
-
append
public ByteBufferReader append(ByteBuffer... buffs)
-
create
public static ByteBufferReader create(ByteBuffer buffer)
-
create
public static ByteBufferReader create(Collection<ByteBuffer> buffers)
-
create
public static ByteBufferReader create(ByteBuffer[] buffers)
-
toBytes
public static byte[] toBytes(ByteBuffer[] buffers)
-
hasRemaining
public static boolean hasRemaining(ByteBuffer... buffers)
-
remaining
public static int remaining(ByteBuffer... buffers)
-
remaining
public static int remaining(ByteBuffer[] buffers, int offset, int length)
-
hasRemaining
public boolean hasRemaining()
-
remaining
public int remaining()
-
preget
public byte preget()
-
get
public byte get()
-
getShort
public short getShort()
-
getInt
public int getInt()
-
getFloat
public float getFloat()
-
getLong
public long getLong()
-
getDouble
public double getDouble()
-
get
public ByteBufferReader get(byte[] dst)
-
get
public ByteBufferReader get(byte[] dst, int offset, int length)
-
skip
public ByteBufferReader skip(int size)
-
-