| 程序包 | 说明 |
|---|---|
| cn.sexycode.util.core.io.buffer |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
PooledDataBuffer
Extension of
DataBuffer that allows for buffer that share
a memory pool. |
| 限定符和类型 | 类和说明 |
|---|---|
class |
DataBufferWrapper
Provides a convenient implementation of the
DataBuffer interface
that can be overridden to adapt the delegate. |
class |
DefaultDataBuffer
Default implementation of the
DataBuffer interface that uses a
ByteBuffer internally. with separate read and write positions. |
| 限定符和类型 | 方法和说明 |
|---|---|
DataBuffer |
DataBufferFactory.allocateBuffer()
Allocate a data buffer of a default initial capacity.
|
DataBuffer |
DataBufferFactory.allocateBuffer(int initialCapacity)
Allocate a data buffer of the given initial capacity.
|
DataBuffer |
DataBufferWrapper.capacity(int capacity) |
DataBuffer |
DataBuffer.capacity(int capacity)
Set the number of bytes that this buffer can contain.
|
DataBuffer |
DataBufferWrapper.dataBuffer()
Return the wrapped delegate.
|
DataBuffer |
DefaultDataBuffer.ensureCapacity(int length) |
DataBuffer |
DataBufferWrapper.ensureCapacity(int capacity) |
default DataBuffer |
DataBuffer.ensureCapacity(int capacity)
Ensure that the current buffer has enough
writableByteCount()
to write the amount of data given as an argument. |
DataBuffer |
DataBufferFactory.join(List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
DataBufferWrapper.read(byte[] destination) |
DataBuffer |
DataBuffer.read(byte[] destination)
Read this buffer's data into the specified destination, starting at the current
reading position of this buffer.
|
DataBuffer |
DataBufferWrapper.read(byte[] destination,
int offset,
int length) |
DataBuffer |
DataBuffer.read(byte[] destination,
int offset,
int length)
Read at most
length bytes of this buffer into the specified destination,
starting at the current reading position of this buffer. |
DataBuffer |
DataBufferWrapper.readPosition(int readPosition) |
DataBuffer |
DataBuffer.readPosition(int readPosition)
Set the position from which this buffer will read.
|
DataBuffer |
LimitedDataBufferList.remove(int index) |
DataBuffer |
LimitedDataBufferList.set(int index,
DataBuffer element) |
DataBuffer |
DataBufferWrapper.slice(int index,
int length) |
DataBuffer |
DataBuffer.slice(int index,
int length)
Create a new
DataBuffer whose contents is a shared subsequence of this
data buffer's content. |
DataBuffer |
DataBufferFactory.wrap(byte[] bytes)
Wrap the given
byte array in a DataBuffer. |
DataBuffer |
DataBufferFactory.wrap(ByteBuffer byteBuffer)
Wrap the given
ByteBuffer in a DataBuffer. |
DataBuffer |
DataBufferWrapper.write(byte b) |
DataBuffer |
DataBuffer.write(byte b)
Write a single byte into this buffer at the current writing position.
|
DataBuffer |
DataBufferWrapper.write(byte[] source) |
DataBuffer |
DataBuffer.write(byte[] source)
Write the given source into this buffer, starting at the current writing position
of this buffer.
|
DataBuffer |
DataBufferWrapper.write(byte[] source,
int offset,
int length) |
DataBuffer |
DataBuffer.write(byte[] source,
int offset,
int length)
Write at most
length bytes of the given source into this buffer, starting
at the current writing position of this buffer. |
DataBuffer |
DataBufferWrapper.write(ByteBuffer... buffers) |
DataBuffer |
DataBuffer.write(ByteBuffer... buffers)
Write one or more
ByteBuffer to this buffer, starting at the current
writing position. |
DataBuffer |
DataBufferWrapper.write(CharSequence charSequence,
Charset charset) |
default DataBuffer |
DataBuffer.write(CharSequence charSequence,
Charset charset)
Write the given
CharSequence using the given Charset,
starting at the current writing position. |
DataBuffer |
DataBufferWrapper.write(DataBuffer... buffers) |
DataBuffer |
DataBuffer.write(DataBuffer... buffers)
Write one or more
DataBuffers to this buffer, starting at the current
writing position. |
DataBuffer |
DataBufferWrapper.writePosition(int writePosition) |
DataBuffer |
DataBuffer.writePosition(int writePosition)
Set the position to which this buffer will write.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
LimitedDataBufferList.add(DataBuffer buffer) |
void |
LimitedDataBufferList.add(int index,
DataBuffer buffer) |
DataBuffer |
LimitedDataBufferList.set(int index,
DataBuffer element) |
DefaultDataBuffer |
DefaultDataBuffer.write(DataBuffer... buffers) |
DataBuffer |
DataBufferWrapper.write(DataBuffer... buffers) |
DataBuffer |
DataBuffer.write(DataBuffer... buffers)
Write one or more
DataBuffers to this buffer, starting at the current
writing position. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
LimitedDataBufferList.addAll(Collection<? extends DataBuffer> collection) |
boolean |
LimitedDataBufferList.addAll(int index,
Collection<? extends DataBuffer> collection) |
DefaultDataBuffer |
DefaultDataBufferFactory.join(List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
DataBufferFactory.join(List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
boolean |
LimitedDataBufferList.removeIf(Predicate<? super DataBuffer> filter) |
| 构造器和说明 |
|---|
DataBufferWrapper(DataBuffer delegate)
Create a new
DataBufferWrapper that wraps the given buffer. |
Copyright © 2020. All rights reserved.