Constructor and Description |
---|
FastByteBuffer() |
FastByteBuffer(int size) |
Modifier and Type | Method and Description |
---|---|
FastByteBuffer |
append(byte element)
向快速缓冲加入一个字节
|
FastByteBuffer |
append(byte[] array)
向快速缓冲加入数据
|
FastByteBuffer |
append(byte[] array,
int off,
int len)
向快速缓冲加入数据
|
FastByteBuffer |
append(FastByteBuffer buff)
将另一个快速缓冲加入到自身
|
byte[] |
array(int index)
根据索引位返回缓冲集中的缓冲
|
byte |
get(int index)
根据索引位返回一个字节
|
int |
index()
当前缓冲位于缓冲区的索引位
|
boolean |
isEmpty() |
int |
offset() |
void |
reset() |
int |
size() |
byte[] |
toArray()
返回快速缓冲中的数据
|
byte[] |
toArray(int start,
int len)
返回快速缓冲中的数据
|
public FastByteBuffer()
public FastByteBuffer(int size)
public FastByteBuffer append(byte[] array, int off, int len)
array
- 数据off
- 偏移量len
- 字节数public FastByteBuffer append(byte[] array)
array
- 数据public FastByteBuffer append(byte element)
element
- 一个字节的数据public FastByteBuffer append(FastByteBuffer buff)
buff
- 快速缓冲public int size()
public boolean isEmpty()
public int index()
currentBufferIndex
public int offset()
public byte[] array(int index)
index
- 索引位public void reset()
public byte[] toArray()
public byte[] toArray(int start, int len)
start
- 逻辑起始位置len
- 逻辑字节长public byte get(int index)
index
- 索引位Copyright © 2024. All rights reserved.