Modifier and Type | Interface and Description |
---|---|
interface |
CompositeByteBuf |
interface |
WrappedByteBuf
The common interface for buffer wrappers and derived buffers.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractByteBuf
A skeletal implementation of a buffer.
|
class |
DefaultCompositeByteBuf
A virtual buffer which shows multiple buffers as a single merged buffer.
|
class |
DirectByteBuf
A NIO
ByteBuffer based buffer. |
class |
DuplicatedByteBuf
A derived buffer which simply forwards all data access requests to its
parent.
|
class |
HeapByteBuf
Big endian Java heap buffer implementation.
|
class |
ReadOnlyByteBuf
A derived buffer which forbids any write requests to its parent.
|
class |
SlicedByteBuf
A derived buffer which exposes its parent's sub-region only.
|
class |
SwappedByteBuf |
Modifier and Type | Field and Description |
---|---|
static ByteBuf |
Unpooled.EMPTY_BUFFER
A buffer whose capacity is
0 . |
Modifier and Type | Method and Description |
---|---|
ByteBuf |
ByteBufOutputStream.buffer()
Returns the buffer where this stream is writing data.
|
static ByteBuf |
Unpooled.buffer()
Creates a new big-endian Java heap buffer with reasonably small initial capacity, which
expands its capacity boundlessly on demand.
|
static ByteBuf |
Unpooled.buffer(int initialCapacity)
Creates a new big-endian Java heap buffer with the specified
capacity , which
expands its capacity boundlessly on demand. |
static ByteBuf |
Unpooled.buffer(int initialCapacity,
int maxCapacity)
Creates a new big-endian Java heap buffer with the specified
capacity . |
ByteBuf |
CompositeByteBuf.component(int cIndex) |
ByteBuf |
DefaultCompositeByteBuf.component(int cIndex) |
ByteBuf |
CompositeByteBuf.componentAtOffset(int offset) |
ByteBuf |
DefaultCompositeByteBuf.componentAtOffset(int offset) |
static ByteBuf |
Unpooled.copiedBuffer(byte[]... arrays)
Creates a new big-endian buffer whose content is a merged copy of
the specified
arrays . |
static ByteBuf |
Unpooled.copiedBuffer(byte[] array)
Creates a new big-endian buffer whose content is a copy of the
specified
array . |
static ByteBuf |
Unpooled.copiedBuffer(byte[] array,
int offset,
int length)
Creates a new big-endian buffer whose content is a copy of the
specified
array 's sub-region. |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuf... buffers)
Creates a new buffer whose content is a merged copy of the specified
buffers ' readable bytes. |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuf buffer)
Creates a new buffer whose content is a copy of the specified
buffer 's readable bytes. |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuffer... buffers)
Creates a new buffer whose content is a merged copy of the specified
buffers ' slices. |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuffer buffer)
Creates a new buffer whose content is a copy of the specified
buffer 's current slice. |
static ByteBuf |
Unpooled.copiedBuffer(char[] array,
Charset charset)
Creates a new big-endian buffer whose content is the specified
array encoded in the specified charset . |
static ByteBuf |
Unpooled.copiedBuffer(char[] array,
int offset,
int length,
Charset charset)
Creates a new big-endian buffer whose content is a subregion of
the specified
array encoded in the specified charset . |
static ByteBuf |
Unpooled.copiedBuffer(CharSequence string,
Charset charset)
Creates a new big-endian buffer whose content is the specified
string encoded in the specified charset . |
static ByteBuf |
Unpooled.copiedBuffer(CharSequence string,
int offset,
int length,
Charset charset)
Creates a new big-endian buffer whose content is a subregion of
the specified
string encoded in the specified charset . |
ByteBuf |
ByteBuf.copy()
Returns a copy of this buffer's readable bytes.
|
ByteBuf |
SwappedByteBuf.copy() |
ByteBuf |
AbstractByteBuf.copy() |
ByteBuf |
ReadOnlyByteBuf.copy(int index,
int length) |
ByteBuf |
DirectByteBuf.copy(int index,
int length) |
ByteBuf |
SlicedByteBuf.copy(int index,
int length) |
ByteBuf |
DefaultCompositeByteBuf.copy(int index,
int length) |
ByteBuf |
HeapByteBuf.copy(int index,
int length) |
ByteBuf |
ByteBuf.copy(int index,
int length)
Returns a copy of this buffer's sub-region.
|
ByteBuf |
DuplicatedByteBuf.copy(int index,
int length) |
ByteBuf |
SwappedByteBuf.copy(int index,
int length) |
static ByteBuf |
Unpooled.copyBoolean(boolean... values)
Create a new big-endian buffer that holds a sequence of the specified boolean values.
|
static ByteBuf |
Unpooled.copyBoolean(boolean value)
Creates a new single-byte big-endian buffer that holds the specified boolean value.
|
static ByteBuf |
Unpooled.copyDouble(double... values)
Create a new big-endian buffer that holds a sequence of the specified 64-bit floating point numbers.
|
static ByteBuf |
Unpooled.copyDouble(double value)
Creates a new 8-byte big-endian buffer that holds the specified 64-bit floating point number.
|
static ByteBuf |
Unpooled.copyFloat(float... values)
Create a new big-endian buffer that holds a sequence of the specified 32-bit floating point numbers.
|
static ByteBuf |
Unpooled.copyFloat(float value)
Creates a new 4-byte big-endian buffer that holds the specified 32-bit floating point number.
|
static ByteBuf |
Unpooled.copyInt(int... values)
Create a big-endian buffer that holds a sequence of the specified 32-bit integers.
|
static ByteBuf |
Unpooled.copyInt(int value)
Creates a new 4-byte big-endian buffer that holds the specified 32-bit integer.
|
static ByteBuf |
Unpooled.copyLong(long... values)
Create a new big-endian buffer that holds a sequence of the specified 64-bit integers.
|
static ByteBuf |
Unpooled.copyLong(long value)
Creates a new 8-byte big-endian buffer that holds the specified 64-bit integer.
|
static ByteBuf |
Unpooled.copyMedium(int... values)
Create a new big-endian buffer that holds a sequence of the specified 24-bit integers.
|
static ByteBuf |
Unpooled.copyMedium(int value)
Creates a new 3-byte big-endian buffer that holds the specified 24-bit integer.
|
static ByteBuf |
Unpooled.copyShort(int... values)
Create a new big-endian buffer that holds a sequence of the specified 16-bit integers.
|
static ByteBuf |
Unpooled.copyShort(int value)
Creates a new 2-byte big-endian buffer that holds the specified 16-bit integer.
|
static ByteBuf |
Unpooled.copyShort(short... values)
Create a new big-endian buffer that holds a sequence of the specified 16-bit integers.
|
static ByteBuf |
Unpooled.directBuffer()
Creates a new big-endian direct buffer with resaonably small initial capacity, which
expands its capacity boundlessly on demand.
|
static ByteBuf |
Unpooled.directBuffer(int initialCapacity)
Creates a new big-endian direct buffer with the specified
capacity , which
expands its capacity boundlessly on demand. |
static ByteBuf |
Unpooled.directBuffer(int initialCapacity,
int maxCapacity)
Creates a new big-endian direct buffer with the specified
capacity . |
ByteBuf |
ReadOnlyByteBuf.duplicate() |
ByteBuf |
SlicedByteBuf.duplicate() |
ByteBuf |
ByteBuf.duplicate()
Returns a buffer which shares the whole region of this buffer.
|
ByteBuf |
DuplicatedByteBuf.duplicate() |
ByteBuf |
SwappedByteBuf.duplicate() |
ByteBuf |
AbstractByteBuf.duplicate() |
ByteBuf |
ByteBuf.Unsafe.newBuffer(int initialCapacity)
Returns a new buffer whose type is identical to the callee.
|
ByteBuf |
ByteBuf.order(ByteOrder endianness)
Returns a buffer with the specified
endianness which shares the whole region,
indexes, and marks of this buffer. |
ByteBuf |
SwappedByteBuf.order(ByteOrder endianness) |
ByteBuf |
AbstractByteBuf.order(ByteOrder endianness) |
ByteBuf |
ByteBuf.readBytes(int length)
Transfers this buffer's data to a newly created buffer starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length ). |
ByteBuf |
SwappedByteBuf.readBytes(int length) |
ByteBuf |
AbstractByteBuf.readBytes(int length) |
ByteBuf |
ByteBuf.readSlice(int length)
Returns a new slice of this buffer's sub-region starting at the current
readerIndex and increases the readerIndex by the size
of the new slice (= length ). |
ByteBuf |
SwappedByteBuf.readSlice(int length) |
ByteBuf |
AbstractByteBuf.readSlice(int length) |
ByteBuf |
ByteBuf.slice()
Returns a slice of this buffer's readable bytes.
|
ByteBuf |
SwappedByteBuf.slice() |
ByteBuf |
AbstractByteBuf.slice() |
ByteBuf |
ReadOnlyByteBuf.slice(int index,
int length) |
ByteBuf |
SlicedByteBuf.slice(int index,
int length) |
ByteBuf |
ByteBuf.slice(int index,
int length)
Returns a slice of this buffer's sub-region.
|
ByteBuf |
DuplicatedByteBuf.slice(int index,
int length) |
ByteBuf |
SwappedByteBuf.slice(int index,
int length) |
ByteBuf |
AbstractByteBuf.slice(int index,
int length) |
static ByteBuf |
Unpooled.unmodifiableBuffer(ByteBuf buffer)
Creates a read-only buffer which disallows any modification operations
on the specified
buffer . |
ByteBuf |
ReadOnlyByteBuf.unwrap() |
ByteBuf |
SlicedByteBuf.unwrap() |
ByteBuf |
WrappedByteBuf.unwrap()
Returns this buffer's parent that this buffer is wrapping.
|
ByteBuf |
DuplicatedByteBuf.unwrap() |
ByteBuf |
SwappedByteBuf.unwrap() |
static ByteBuf |
Unpooled.wrappedBuffer(byte[]... arrays)
Creates a new big-endian composite buffer which wraps the specified
arrays without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(byte[] array)
Creates a new big-endian buffer which wraps the specified
array . |
static ByteBuf |
Unpooled.wrappedBuffer(byte[] array,
int offset,
int length)
Creates a new big-endian buffer which wraps the sub-region of the
specified
array . |
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuf... buffers)
Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuf buffer)
Creates a new buffer which wraps the specified buffer's readable bytes.
|
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuffer... buffers)
Creates a new big-endian composite buffer which wraps the slices of the specified
NIO buffers without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuffer buffer)
Creates a new buffer which wraps the specified NIO buffer's current
slice.
|
static ByteBuf |
Unpooled.wrappedBuffer(int maxNumComponents,
byte[]... arrays)
Creates a new big-endian composite buffer which wraps the specified
arrays without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(int maxNumComponents,
ByteBuf... buffers)
Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(int maxNumComponents,
ByteBuffer... buffers)
Creates a new big-endian composite buffer which wraps the slices of the specified
NIO buffers without copying them.
|
Modifier and Type | Method and Description |
---|---|
List<ByteBuf> |
CompositeByteBuf.decompose(int offset,
int length)
Same with
slice(int, int) except that this method returns a list. |
List<ByteBuf> |
DefaultCompositeByteBuf.decompose(int offset,
int length) |
Iterator<ByteBuf> |
DefaultCompositeByteBuf.iterator() |
Modifier and Type | Method and Description |
---|---|
void |
CompositeByteBuf.addComponent(ByteBuf buffer) |
void |
DefaultCompositeByteBuf.addComponent(ByteBuf buffer) |
void |
CompositeByteBuf.addComponent(int cIndex,
ByteBuf buffer) |
void |
DefaultCompositeByteBuf.addComponent(int cIndex,
ByteBuf buffer) |
void |
CompositeByteBuf.addComponents(ByteBuf... buffers) |
void |
DefaultCompositeByteBuf.addComponents(ByteBuf... buffers) |
void |
CompositeByteBuf.addComponents(int cIndex,
ByteBuf... buffers) |
void |
DefaultCompositeByteBuf.addComponents(int cIndex,
ByteBuf... buffers) |
static int |
ByteBufUtil.compare(ByteBuf bufferA,
ByteBuf bufferB)
Compares the two specified buffers as described in
compareTo(ByteBuf) . |
int |
ByteBuf.compareTo(ByteBuf buffer)
Compares the content of the specified buffer to the content of this
buffer.
|
int |
SwappedByteBuf.compareTo(ByteBuf buffer) |
int |
AbstractByteBuf.compareTo(ByteBuf that) |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuf... buffers)
Creates a new buffer whose content is a merged copy of the specified
buffers ' readable bytes. |
static ByteBuf |
Unpooled.copiedBuffer(ByteBuf buffer)
Creates a new buffer whose content is a copy of the specified
buffer 's readable bytes. |
static boolean |
ByteBufUtil.equals(ByteBuf bufferA,
ByteBuf bufferB)
Returns
true if and only if the two specified buffers are
identical to each other as described in ChannelBuffer#equals(Object) . |
boolean |
ByteBufIndexFinder.find(ByteBuf buffer,
int guessedIndex)
Returns
true if and only if the data is found at the specified
guessedIndex of the specified buffer . |
void |
ByteBuf.getBytes(int index,
ByteBuf dst)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index until the destination becomes
non-writable. |
void |
SwappedByteBuf.getBytes(int index,
ByteBuf dst) |
void |
AbstractByteBuf.getBytes(int index,
ByteBuf dst) |
void |
ByteBuf.getBytes(int index,
ByteBuf dst,
int length)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index . |
void |
SwappedByteBuf.getBytes(int index,
ByteBuf dst,
int length) |
void |
AbstractByteBuf.getBytes(int index,
ByteBuf dst,
int length) |
void |
ReadOnlyByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
DirectByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
SlicedByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
DefaultCompositeByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
HeapByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
ByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index . |
void |
DuplicatedByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
void |
SwappedByteBuf.getBytes(int index,
ByteBuf dst,
int dstIndex,
int length) |
static int |
ByteBufUtil.hashCode(ByteBuf buffer)
Calculates the hash code of the specified buffer.
|
static String |
ByteBufUtil.hexDump(ByteBuf buffer)
Returns a hex dump
of the specified buffer's readable bytes.
|
static String |
ByteBufUtil.hexDump(ByteBuf buffer,
int fromIndex,
int length)
Returns a hex dump
of the specified buffer's sub-region.
|
static int |
ByteBufUtil.indexOf(ByteBuf buffer,
int fromIndex,
int toIndex,
byte value)
The default implementation of
indexOf(int, int, byte) . |
static int |
ByteBufUtil.indexOf(ByteBuf buffer,
int fromIndex,
int toIndex,
ByteBufIndexFinder indexFinder)
The default implementation of
indexOf(int, int, ByteBufIndexFinder) . |
void |
ByteBuf.readBytes(ByteBuf dst)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex until the destination becomes
non-writable, and increases the readerIndex by the number of the
transferred bytes. |
void |
SwappedByteBuf.readBytes(ByteBuf dst) |
void |
AbstractByteBuf.readBytes(ByteBuf dst) |
void |
ByteBuf.readBytes(ByteBuf dst,
int length)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length ). |
void |
SwappedByteBuf.readBytes(ByteBuf dst,
int length) |
void |
AbstractByteBuf.readBytes(ByteBuf dst,
int length) |
void |
ByteBuf.readBytes(ByteBuf dst,
int dstIndex,
int length)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length ). |
void |
SwappedByteBuf.readBytes(ByteBuf dst,
int dstIndex,
int length) |
void |
AbstractByteBuf.readBytes(ByteBuf dst,
int dstIndex,
int length) |
void |
ByteBuf.setBytes(int index,
ByteBuf src)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index until the source buffer becomes
unreadable. |
void |
SwappedByteBuf.setBytes(int index,
ByteBuf src) |
void |
AbstractByteBuf.setBytes(int index,
ByteBuf src) |
void |
ByteBuf.setBytes(int index,
ByteBuf src,
int length)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index . |
void |
SwappedByteBuf.setBytes(int index,
ByteBuf src,
int length) |
void |
AbstractByteBuf.setBytes(int index,
ByteBuf src,
int length) |
void |
ReadOnlyByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
DirectByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
SlicedByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
DefaultCompositeByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
HeapByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
ByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index . |
void |
DuplicatedByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
void |
SwappedByteBuf.setBytes(int index,
ByteBuf src,
int srcIndex,
int length) |
static ByteBuf |
Unpooled.unmodifiableBuffer(ByteBuf buffer)
Creates a read-only buffer which disallows any modification operations
on the specified
buffer . |
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuf... buffers)
Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them.
|
static ByteBuf |
Unpooled.wrappedBuffer(ByteBuf buffer)
Creates a new buffer which wraps the specified buffer's readable bytes.
|
static ByteBuf |
Unpooled.wrappedBuffer(int maxNumComponents,
ByteBuf... buffers)
Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them.
|
void |
ByteBuf.writeBytes(ByteBuf src)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes. |
void |
SwappedByteBuf.writeBytes(ByteBuf src) |
void |
AbstractByteBuf.writeBytes(ByteBuf src) |
void |
ByteBuf.writeBytes(ByteBuf src,
int length)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length ). |
void |
SwappedByteBuf.writeBytes(ByteBuf src,
int length) |
void |
AbstractByteBuf.writeBytes(ByteBuf src,
int length) |
void |
ByteBuf.writeBytes(ByteBuf src,
int srcIndex,
int length)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length ). |
void |
SwappedByteBuf.writeBytes(ByteBuf src,
int srcIndex,
int length) |
void |
AbstractByteBuf.writeBytes(ByteBuf src,
int srcIndex,
int length) |
Modifier and Type | Method and Description |
---|---|
void |
CompositeByteBuf.addComponents(int cIndex,
Iterable<ByteBuf> buffers) |
void |
DefaultCompositeByteBuf.addComponents(int cIndex,
Iterable<ByteBuf> buffers) |
void |
CompositeByteBuf.addComponents(Iterable<ByteBuf> buffers) |
void |
DefaultCompositeByteBuf.addComponents(Iterable<ByteBuf> buffers) |
Constructor and Description |
---|
ByteBufInputStream(ByteBuf buffer)
Creates a new stream which reads data from the specified
buffer
starting at the current readerIndex and ending at the current
writerIndex . |
ByteBufInputStream(ByteBuf buffer,
int length)
Creates a new stream which reads data from the specified
buffer
starting at the current readerIndex and ending at
readerIndex + length . |
ByteBufOutputStream(ByteBuf buffer)
Creates a new stream which writes data to the specified
buffer . |
DefaultCompositeByteBuf(int maxNumComponents,
ByteBuf... buffers) |
DuplicatedByteBuf(ByteBuf buffer) |
ReadOnlyByteBuf(ByteBuf buffer) |
SlicedByteBuf(ByteBuf buffer,
int index,
int length) |
SwappedByteBuf(ByteBuf buf) |
Constructor and Description |
---|
DefaultCompositeByteBuf(int maxNumComponents,
Iterable<ByteBuf> buffers) |
Copyright © 2008-2012 The Netty Project. All Rights Reserved.