Uses of Class
io.netty.buffer.ByteBuf
Packages that use ByteBuf
Package
Description
Abstraction of a byte buffer - the fundamental data structure
to represent a low-level binary and text message.
-
Uses of ByteBuf in io.netty.buffer
Subclasses of ByteBuf in io.netty.bufferModifier and TypeClassDescriptionclassA skeletal implementation of a buffer.classDeprecated.Do not use.classAbstract base class forByteBufimplementations that count references.classA virtual buffer which shows multiple buffers as a single merged buffer.classDeprecated.Do not use.final classAn emptyByteBufwhose capacity and maximum capacity are all0.classDeprecated.Do not use.classDeprecated.Do not use.classDeprecated.use the Little Endian accessors, e.g.classA NIOByteBufferbased buffer.classBig endian Java heap buffer implementation.classA NIOByteBufferbased buffer.classBig endian Java heap buffer implementation.Fields in io.netty.buffer declared as ByteBufModifier and TypeFieldDescriptionstatic final ByteBufUnpooled.EMPTY_BUFFERA buffer whose capacity is0.Methods in io.netty.buffer that return ByteBufModifier and TypeMethodDescriptionByteBuf.asByteBuf()AByteBufcan turn into itself.ByteBufConvertible.asByteBuf()Turn this object into aByteBuf.AbstractByteBuf.asReadOnly()abstract ByteBufByteBuf.asReadOnly()Returns a read-only version of this buffer.EmptyByteBuf.asReadOnly()ReadOnlyByteBuf.asReadOnly()Deprecated.SwappedByteBuf.asReadOnly()Deprecated.AbstractByteBufAllocator.buffer()AbstractByteBufAllocator.buffer(int initialCapacity) AbstractByteBufAllocator.buffer(int initialCapacity, int maxCapacity) ByteBufAllocator.buffer()Allocate aByteBuf.ByteBufAllocator.buffer(int initialCapacity) Allocate aByteBufwith the given initial capacity.ByteBufAllocator.buffer(int initialCapacity, int maxCapacity) Allocate aByteBufwith the given initial capacity and the given maximal capacity.ByteBufOutputStream.buffer()Returns the buffer where this stream is writing data.static ByteBufUnpooled.buffer()Creates a new big-endian Java heap buffer with reasonably small initial capacity, which expands its capacity boundlessly on demand.static ByteBufUnpooled.buffer(int initialCapacity) Creates a new big-endian Java heap buffer with the specifiedcapacity, which expands its capacity boundlessly on demand.static ByteBufUnpooled.buffer(int initialCapacity, int maxCapacity) Creates a new big-endian Java heap buffer with the specifiedinitialCapacity, that may grow up tomaxCapacityThe new buffer'sreaderIndexandwriterIndexare0.abstract ByteBufByteBuf.capacity(int newCapacity) Adjusts the capacity of this buffer.DuplicatedByteBuf.capacity(int newCapacity) Deprecated.EmptyByteBuf.capacity(int newCapacity) ReadOnlyByteBuf.capacity(int newCapacity) Deprecated.SwappedByteBuf.capacity(int newCapacity) Deprecated.UnpooledDirectByteBuf.capacity(int newCapacity) UnpooledHeapByteBuf.capacity(int newCapacity) AbstractByteBuf.clear()abstract ByteBufByteBuf.clear()Sets thereaderIndexandwriterIndexof this buffer to0.EmptyByteBuf.clear()SwappedByteBuf.clear()Deprecated.CompositeByteBuf.component(int cIndex) Return theByteBufon the specified indexCompositeByteBuf.componentAtOffset(int offset) Return theByteBufon the specified indexByteBufHolder.content()Return the data which is held by thisByteBufHolder.DefaultByteBufHolder.content()static ByteBufUnpooled.copiedBuffer(byte[] array) Creates a new big-endian buffer whose content is a copy of the specifiedarray.static ByteBufUnpooled.copiedBuffer(byte[]... arrays) Creates a new big-endian buffer whose content is a merged copy of the specifiedarrays.static ByteBufUnpooled.copiedBuffer(byte[] array, int offset, int length) Creates a new big-endian buffer whose content is a copy of the specifiedarray's sub-region.static ByteBufUnpooled.copiedBuffer(char[] array, int offset, int length, Charset charset) Creates a new big-endian buffer whose content is a subregion of the specifiedarrayencoded in the specifiedcharset.static ByteBufUnpooled.copiedBuffer(char[] array, Charset charset) Creates a new big-endian buffer whose content is the specifiedarrayencoded in the specifiedcharset.static ByteBufUnpooled.copiedBuffer(ByteBuf buffer) Creates a new buffer whose content is a copy of the specifiedbuffer's readable bytes.static ByteBufUnpooled.copiedBuffer(ByteBuf... buffers) Creates a new buffer whose content is a merged copy of the specifiedbuffers' readable bytes.static ByteBufUnpooled.copiedBuffer(CharSequence string, int offset, int length, Charset charset) Creates a new big-endian buffer whose content is a subregion of the specifiedstringencoded in the specifiedcharset.static ByteBufUnpooled.copiedBuffer(CharSequence string, Charset charset) Creates a new big-endian buffer whose content is the specifiedstringencoded in the specifiedcharset.static ByteBufUnpooled.copiedBuffer(ByteBuffer buffer) Creates a new buffer whose content is a copy of the specifiedbuffer's current slice.static ByteBufUnpooled.copiedBuffer(ByteBuffer... buffers) Creates a new buffer whose content is a merged copy of the specifiedbuffers' slices.AbstractByteBuf.copy()abstract ByteBufByteBuf.copy()Returns a copy of this buffer's readable bytes.abstract ByteBufByteBuf.copy(int index, int length) Returns a copy of this buffer's sub-region.CompositeByteBuf.copy(int index, int length) DuplicatedByteBuf.copy(int index, int length) Deprecated.EmptyByteBuf.copy()EmptyByteBuf.copy(int index, int length) ReadOnlyByteBuf.copy(int index, int length) Deprecated.SwappedByteBuf.copy()Deprecated.SwappedByteBuf.copy(int index, int length) Deprecated.UnpooledDirectByteBuf.copy(int index, int length) UnpooledHeapByteBuf.copy(int index, int length) UnpooledUnsafeDirectByteBuf.copy(int index, int length) static ByteBufUnpooled.copyBoolean(boolean value) Creates a new single-byte big-endian buffer that holds the specified boolean value.static ByteBufUnpooled.copyBoolean(boolean... values) Create a new big-endian buffer that holds a sequence of the specified boolean values.static ByteBufUnpooled.copyDouble(double value) Creates a new 8-byte big-endian buffer that holds the specified 64-bit floating point number.static ByteBufUnpooled.copyDouble(double... values) Create a new big-endian buffer that holds a sequence of the specified 64-bit floating point numbers.static ByteBufUnpooled.copyFloat(float value) Creates a new 4-byte big-endian buffer that holds the specified 32-bit floating point number.static ByteBufUnpooled.copyFloat(float... values) Create a new big-endian buffer that holds a sequence of the specified 32-bit floating point numbers.static ByteBufUnpooled.copyInt(int value) Creates a new 4-byte big-endian buffer that holds the specified 32-bit integer.static ByteBufUnpooled.copyInt(int... values) Create a big-endian buffer that holds a sequence of the specified 32-bit integers.static ByteBufUnpooled.copyLong(long value) Creates a new 8-byte big-endian buffer that holds the specified 64-bit integer.static ByteBufUnpooled.copyLong(long... values) Create a new big-endian buffer that holds a sequence of the specified 64-bit integers.static ByteBufUnpooled.copyMedium(int value) Creates a new 3-byte big-endian buffer that holds the specified 24-bit integer.static ByteBufUnpooled.copyMedium(int... values) Create a new big-endian buffer that holds a sequence of the specified 24-bit integers.static ByteBufUnpooled.copyShort(int value) Creates a new 2-byte big-endian buffer that holds the specified 16-bit integer.static ByteBufUnpooled.copyShort(int... values) Create a new big-endian buffer that holds a sequence of the specified 16-bit integers.static ByteBufUnpooled.copyShort(short... values) Create a new big-endian buffer that holds a sequence of the specified 16-bit integers.AbstractByteBufAllocator.directBuffer()AbstractByteBufAllocator.directBuffer(int initialCapacity) AbstractByteBufAllocator.directBuffer(int initialCapacity, int maxCapacity) ByteBufAllocator.directBuffer()Allocate a directByteBuf.ByteBufAllocator.directBuffer(int initialCapacity) Allocate a directByteBufwith the given initial capacity.ByteBufAllocator.directBuffer(int initialCapacity, int maxCapacity) Allocate a directByteBufwith the given initial capacity and the given maximal capacity.static ByteBufUnpooled.directBuffer()Creates a new big-endian direct buffer with reasonably small initial capacity, which expands its capacity boundlessly on demand.static ByteBufUnpooled.directBuffer(int initialCapacity) Creates a new big-endian direct buffer with the specifiedcapacity, which expands its capacity boundlessly on demand.static ByteBufUnpooled.directBuffer(int initialCapacity, int maxCapacity) Creates a new big-endian direct buffer with the specifiedinitialCapacity, that may grow up tomaxCapacity.AbstractByteBuf.discardReadBytes()abstract ByteBufByteBuf.discardReadBytes()Discards the bytes between the 0th index andreaderIndex.EmptyByteBuf.discardReadBytes()ReadOnlyByteBuf.discardReadBytes()Deprecated.SwappedByteBuf.discardReadBytes()Deprecated.AbstractByteBuf.discardSomeReadBytes()abstract ByteBufByteBuf.discardSomeReadBytes()Similar todiscardReadBytes()except that this method might discard some, all, or none of read bytes depending on its internal implementation to reduce overall memory bandwidth consumption at the cost of potentially additional memory consumption.EmptyByteBuf.discardSomeReadBytes()SwappedByteBuf.discardSomeReadBytes()Deprecated.AbstractByteBuf.duplicate()abstract ByteBufByteBuf.duplicate()Returns a buffer which shares the whole region of this buffer.EmptyByteBuf.duplicate()ReadOnlyByteBuf.duplicate()Deprecated.SwappedByteBuf.duplicate()Deprecated.static ByteBufByteBufUtil.encodeString(ByteBufAllocator alloc, CharBuffer src, Charset charset) Encode the givenCharBufferusing the givenCharsetinto a newByteBufwhich is allocated via theByteBufAllocator.static ByteBufByteBufUtil.encodeString(ByteBufAllocator alloc, CharBuffer src, Charset charset, int extraCapacity) Encode the givenCharBufferusing the givenCharsetinto a newByteBufwhich is allocated via theByteBufAllocator.static ByteBufByteBufUtil.ensureAccessible(ByteBuf buffer) AbstractByteBuf.ensureWritable(int minWritableBytes) abstract ByteBufByteBuf.ensureWritable(int minWritableBytes) Expands the buffercapacity()to make sure the number of writable bytes is equal to or greater than the specified value.EmptyByteBuf.ensureWritable(int minWritableBytes) ReadOnlyByteBuf.ensureWritable(int minWritableBytes) Deprecated.SwappedByteBuf.ensureWritable(int writableBytes) Deprecated.AbstractByteBuf.getBytes(int index, byte[] dst) abstract ByteBufByteBuf.getBytes(int index, byte[] dst) Transfers this buffer's data to the specified destination starting at the specified absoluteindex.abstract ByteBufByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) Transfers this buffer's data to the specified destination starting at the specified absoluteindex.abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination becomes non-writable.abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindex.abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindex.abstract ByteBufByteBuf.getBytes(int index, OutputStream out, int length) Transfers this buffer's data to the specified stream starting at the specified absoluteindex.abstract ByteBufByteBuf.getBytes(int index, ByteBuffer dst) Transfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination's position reaches its limit.DuplicatedByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) Deprecated.Deprecated.DuplicatedByteBuf.getBytes(int index, OutputStream out, int length) Deprecated.DuplicatedByteBuf.getBytes(int index, ByteBuffer dst) Deprecated.EmptyByteBuf.getBytes(int index, byte[] dst) EmptyByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) EmptyByteBuf.getBytes(int index, OutputStream out, int length) EmptyByteBuf.getBytes(int index, ByteBuffer dst) ReadOnlyByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) Deprecated.Deprecated.ReadOnlyByteBuf.getBytes(int index, OutputStream out, int length) Deprecated.ReadOnlyByteBuf.getBytes(int index, ByteBuffer dst) Deprecated.SwappedByteBuf.getBytes(int index, byte[] dst) Deprecated.SwappedByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) Deprecated.Deprecated.Deprecated.Deprecated.SwappedByteBuf.getBytes(int index, OutputStream out, int length) Deprecated.SwappedByteBuf.getBytes(int index, ByteBuffer dst) Deprecated.UnpooledDirectByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) UnpooledDirectByteBuf.getBytes(int index, OutputStream out, int length) UnpooledDirectByteBuf.getBytes(int index, ByteBuffer dst) UnpooledHeapByteBuf.getBytes(int index, byte[] dst, int dstIndex, int length) UnpooledHeapByteBuf.getBytes(int index, OutputStream out, int length) UnpooledHeapByteBuf.getBytes(int index, ByteBuffer dst) AbstractByteBufAllocator.heapBuffer()AbstractByteBufAllocator.heapBuffer(int initialCapacity) AbstractByteBufAllocator.heapBuffer(int initialCapacity, int maxCapacity) ByteBufAllocator.heapBuffer()Allocate a heapByteBuf.ByteBufAllocator.heapBuffer(int initialCapacity) Allocate a heapByteBufwith the given initial capacity.ByteBufAllocator.heapBuffer(int initialCapacity, int maxCapacity) Allocate a heapByteBufwith the given initial capacity and the given maximal capacity.CompositeByteBuf.internalComponent(int cIndex) Return the internalByteBufon the specified index.CompositeByteBuf.internalComponentAtOffset(int offset) Return the internalByteBufon the specified offset.AbstractByteBufAllocator.ioBuffer()AbstractByteBufAllocator.ioBuffer(int initialCapacity) AbstractByteBufAllocator.ioBuffer(int initialCapacity, int maxCapacity) ByteBufAllocator.ioBuffer()Allocate aByteBuf, preferably a direct buffer which is suitable for I/O.ByteBufAllocator.ioBuffer(int initialCapacity) Allocate aByteBuf, preferably a direct buffer which is suitable for I/O.ByteBufAllocator.ioBuffer(int initialCapacity, int maxCapacity) Allocate aByteBuf, preferably a direct buffer which is suitable for I/O.AbstractByteBuf.markReaderIndex()abstract ByteBufByteBuf.markReaderIndex()Marks the currentreaderIndexin this buffer.EmptyByteBuf.markReaderIndex()SwappedByteBuf.markReaderIndex()Deprecated.AbstractByteBuf.markWriterIndex()abstract ByteBufByteBuf.markWriterIndex()Marks the currentwriterIndexin this buffer.EmptyByteBuf.markWriterIndex()SwappedByteBuf.markWriterIndex()Deprecated.protected abstract ByteBufAbstractByteBufAllocator.newDirectBuffer(int initialCapacity, int maxCapacity) Create a directByteBufwith the given initialCapacity and maxCapacity.protected ByteBufPooledByteBufAllocator.newDirectBuffer(int initialCapacity, int maxCapacity) protected ByteBufUnpooledByteBufAllocator.newDirectBuffer(int initialCapacity, int maxCapacity) protected abstract ByteBufAbstractByteBufAllocator.newHeapBuffer(int initialCapacity, int maxCapacity) Create a heapByteBufwith the given initialCapacity and maxCapacity.protected ByteBufPooledByteBufAllocator.newHeapBuffer(int initialCapacity, int maxCapacity) protected ByteBufUnpooledByteBufAllocator.newHeapBuffer(int initialCapacity, int maxCapacity) abstract ByteBufDeprecated.use the Little Endian accessors, e.g.Deprecated.AbstractByteBuf.readBytes(byte[] dst) AbstractByteBuf.readBytes(byte[] dst, int dstIndex, int length) AbstractByteBuf.readBytes(int length) AbstractByteBuf.readBytes(OutputStream out, int length) AbstractByteBuf.readBytes(ByteBuffer dst) abstract ByteBufByteBuf.readBytes(byte[] dst) Transfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=dst.length).abstract ByteBufByteBuf.readBytes(byte[] dst, int dstIndex, int length) Transfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.readBytes(int length) Transfers this buffer's data to a newly created buffer starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexuntil the destination becomes non-writable, and increases thereaderIndexby the number of the transferred bytes.abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.readBytes(OutputStream out, int length) Transfers this buffer's data to the specified stream starting at the currentreaderIndex.abstract ByteBufByteBuf.readBytes(ByteBuffer dst) Transfers this buffer's data to the specified destination starting at the currentreaderIndexuntil the destination's position reaches its limit, and increases thereaderIndexby the number of the transferred bytes.static ByteBufByteBufUtil.readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) Read the given amount of bytes into a newByteBufthat is allocated from theByteBufAllocator.EmptyByteBuf.readBytes(byte[] dst) EmptyByteBuf.readBytes(byte[] dst, int dstIndex, int length) EmptyByteBuf.readBytes(int length) EmptyByteBuf.readBytes(OutputStream out, int length) EmptyByteBuf.readBytes(ByteBuffer dst) SwappedByteBuf.readBytes(byte[] dst) Deprecated.SwappedByteBuf.readBytes(byte[] dst, int dstIndex, int length) Deprecated.SwappedByteBuf.readBytes(int length) Deprecated.Deprecated.Deprecated.Deprecated.SwappedByteBuf.readBytes(OutputStream out, int length) Deprecated.SwappedByteBuf.readBytes(ByteBuffer dst) Deprecated.UnpooledDirectByteBuf.readBytes(byte[] dst, int dstIndex, int length) UnpooledDirectByteBuf.readBytes(OutputStream out, int length) UnpooledDirectByteBuf.readBytes(ByteBuffer dst) AbstractByteBuf.readerIndex(int readerIndex) abstract ByteBufByteBuf.readerIndex(int readerIndex) Sets thereaderIndexof this buffer.EmptyByteBuf.readerIndex(int readerIndex) SwappedByteBuf.readerIndex(int readerIndex) Deprecated.AbstractByteBuf.readRetainedSlice(int length) abstract ByteBufByteBuf.readRetainedSlice(int length) Returns a new retained slice of this buffer's sub-region starting at the currentreaderIndexand increases thereaderIndexby the size of the new slice (=length).EmptyByteBuf.readRetainedSlice(int length) SwappedByteBuf.readRetainedSlice(int length) Deprecated.AbstractByteBuf.readSlice(int length) abstract ByteBufByteBuf.readSlice(int length) Returns a new slice of this buffer's sub-region starting at the currentreaderIndexand increases thereaderIndexby the size of the new slice (=length).EmptyByteBuf.readSlice(int length) SwappedByteBuf.readSlice(int length) Deprecated.AbstractByteBuf.resetReaderIndex()abstract ByteBufByteBuf.resetReaderIndex()Repositions the currentreaderIndexto the markedreaderIndexin this buffer.EmptyByteBuf.resetReaderIndex()SwappedByteBuf.resetReaderIndex()Deprecated.AbstractByteBuf.resetWriterIndex()abstract ByteBufByteBuf.resetWriterIndex()Repositions the currentwriterIndexto the markedwriterIndexin this buffer.EmptyByteBuf.resetWriterIndex()SwappedByteBuf.resetWriterIndex()Deprecated.final ByteBufAbstractDerivedByteBuf.retain()Deprecated.final ByteBufAbstractDerivedByteBuf.retain(int increment) Deprecated.AbstractReferenceCountedByteBuf.retain()AbstractReferenceCountedByteBuf.retain(int increment) abstract ByteBufByteBuf.retain()abstract ByteBufByteBuf.retain(int increment) EmptyByteBuf.retain()EmptyByteBuf.retain(int increment) SwappedByteBuf.retain()Deprecated.SwappedByteBuf.retain(int increment) Deprecated.AbstractByteBuf.retainedDuplicate()abstract ByteBufByteBuf.retainedDuplicate()Returns a retained buffer which shares the whole region of this buffer.EmptyByteBuf.retainedDuplicate()SwappedByteBuf.retainedDuplicate()Deprecated.AbstractByteBuf.retainedSlice()AbstractByteBuf.retainedSlice(int index, int length) abstract ByteBufByteBuf.retainedSlice()Returns a retained slice of this buffer's readable bytes.abstract ByteBufByteBuf.retainedSlice(int index, int length) Returns a retained slice of this buffer's sub-region.EmptyByteBuf.retainedSlice()EmptyByteBuf.retainedSlice(int index, int length) SwappedByteBuf.retainedSlice()Deprecated.SwappedByteBuf.retainedSlice(int index, int length) Deprecated.AbstractByteBuf.setBoolean(int index, boolean value) abstract ByteBufByteBuf.setBoolean(int index, boolean value) Sets the specified boolean at the specified absoluteindexin this buffer.EmptyByteBuf.setBoolean(int index, boolean value) SwappedByteBuf.setBoolean(int index, boolean value) Deprecated.AbstractByteBuf.setByte(int index, int value) abstract ByteBufByteBuf.setByte(int index, int value) Sets the specified byte at the specified absoluteindexin this buffer.DuplicatedByteBuf.setByte(int index, int value) Deprecated.EmptyByteBuf.setByte(int index, int value) ReadOnlyByteBuf.setByte(int index, int value) Deprecated.SwappedByteBuf.setByte(int index, int value) Deprecated.UnpooledDirectByteBuf.setByte(int index, int value) UnpooledHeapByteBuf.setByte(int index, int value) UnpooledUnsafeDirectByteBuf.setByte(int index, int value) UnpooledUnsafeHeapByteBuf.setByte(int index, int value) AbstractByteBuf.setBytes(int index, byte[] src) abstract ByteBufByteBuf.setBytes(int index, byte[] src) Transfers the specified source array's data to this buffer starting at the specified absoluteindex.abstract ByteBufByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) Transfers the specified source array's data to this buffer starting at the specified absoluteindex.abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer becomes unreadable.abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex.abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex.abstract ByteBufByteBuf.setBytes(int index, ByteBuffer src) Transfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer's position reaches its limit.DuplicatedByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) Deprecated.Deprecated.DuplicatedByteBuf.setBytes(int index, ByteBuffer src) Deprecated.EmptyByteBuf.setBytes(int index, byte[] src) EmptyByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) EmptyByteBuf.setBytes(int index, ByteBuffer src) ReadOnlyByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) Deprecated.Deprecated.ReadOnlyByteBuf.setBytes(int index, ByteBuffer src) Deprecated.SwappedByteBuf.setBytes(int index, byte[] src) Deprecated.SwappedByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) Deprecated.Deprecated.Deprecated.Deprecated.SwappedByteBuf.setBytes(int index, ByteBuffer src) Deprecated.UnpooledDirectByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) UnpooledDirectByteBuf.setBytes(int index, ByteBuffer src) UnpooledHeapByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) UnpooledHeapByteBuf.setBytes(int index, ByteBuffer src) UnpooledUnsafeDirectByteBuf.setBytes(int index, byte[] src, int srcIndex, int length) UnpooledUnsafeDirectByteBuf.setBytes(int index, ByteBuffer src) AbstractByteBuf.setChar(int index, int value) abstract ByteBufByteBuf.setChar(int index, int value) Sets the specified 2-byte UTF-16 character at the specified absoluteindexin this buffer.EmptyByteBuf.setChar(int index, int value) SwappedByteBuf.setChar(int index, int value) Deprecated.AbstractByteBuf.setDouble(int index, double value) abstract ByteBufByteBuf.setDouble(int index, double value) Sets the specified 64-bit floating-point number at the specified absoluteindexin this buffer.EmptyByteBuf.setDouble(int index, double value) SwappedByteBuf.setDouble(int index, double value) Deprecated.ByteBuf.setDoubleLE(int index, double value) Sets the specified 64-bit floating-point number at the specified absoluteindexin this buffer in Little Endian Byte Order.AbstractByteBuf.setFloat(int index, float value) abstract ByteBufByteBuf.setFloat(int index, float value) Sets the specified 32-bit floating-point number at the specified absoluteindexin this buffer.EmptyByteBuf.setFloat(int index, float value) SwappedByteBuf.setFloat(int index, float value) Deprecated.ByteBuf.setFloatLE(int index, float value) Sets the specified 32-bit floating-point number at the specified absoluteindexin this buffer in Little Endian Byte Order.AbstractByteBuf.setIndex(int readerIndex, int writerIndex) abstract ByteBufByteBuf.setIndex(int readerIndex, int writerIndex) Sets thereaderIndexandwriterIndexof this buffer in one shot.EmptyByteBuf.setIndex(int readerIndex, int writerIndex) SwappedByteBuf.setIndex(int readerIndex, int writerIndex) Deprecated.AbstractByteBuf.setInt(int index, int value) abstract ByteBufByteBuf.setInt(int index, int value) Sets the specified 32-bit integer at the specified absoluteindexin this buffer.DuplicatedByteBuf.setInt(int index, int value) Deprecated.EmptyByteBuf.setInt(int index, int value) ReadOnlyByteBuf.setInt(int index, int value) Deprecated.SwappedByteBuf.setInt(int index, int value) Deprecated.UnpooledDirectByteBuf.setInt(int index, int value) UnpooledHeapByteBuf.setInt(int index, int value) UnpooledUnsafeDirectByteBuf.setInt(int index, int value) UnpooledUnsafeHeapByteBuf.setInt(int index, int value) AbstractByteBuf.setIntLE(int index, int value) abstract ByteBufByteBuf.setIntLE(int index, int value) Sets the specified 32-bit integer at the specified absoluteindexin this buffer with Little Endian byte order .DuplicatedByteBuf.setIntLE(int index, int value) Deprecated.EmptyByteBuf.setIntLE(int index, int value) ReadOnlyByteBuf.setIntLE(int index, int value) Deprecated.SwappedByteBuf.setIntLE(int index, int value) Deprecated.UnpooledHeapByteBuf.setIntLE(int index, int value) UnpooledUnsafeHeapByteBuf.setIntLE(int index, int value) AbstractByteBuf.setLong(int index, long value) abstract ByteBufByteBuf.setLong(int index, long value) Sets the specified 64-bit long integer at the specified absoluteindexin this buffer.DuplicatedByteBuf.setLong(int index, long value) Deprecated.EmptyByteBuf.setLong(int index, long value) ReadOnlyByteBuf.setLong(int index, long value) Deprecated.SwappedByteBuf.setLong(int index, long value) Deprecated.UnpooledDirectByteBuf.setLong(int index, long value) UnpooledHeapByteBuf.setLong(int index, long value) UnpooledUnsafeDirectByteBuf.setLong(int index, long value) UnpooledUnsafeHeapByteBuf.setLong(int index, long value) AbstractByteBuf.setLongLE(int index, long value) abstract ByteBufByteBuf.setLongLE(int index, long value) Sets the specified 64-bit long integer at the specified absoluteindexin this buffer in Little Endian Byte Order.DuplicatedByteBuf.setLongLE(int index, long value) Deprecated.EmptyByteBuf.setLongLE(int index, long value) ReadOnlyByteBuf.setLongLE(int index, long value) Deprecated.SwappedByteBuf.setLongLE(int index, long value) Deprecated.UnpooledHeapByteBuf.setLongLE(int index, long value) UnpooledUnsafeHeapByteBuf.setLongLE(int index, long value) AbstractByteBuf.setMedium(int index, int value) abstract ByteBufByteBuf.setMedium(int index, int value) Sets the specified 24-bit medium integer at the specified absoluteindexin this buffer.DuplicatedByteBuf.setMedium(int index, int value) Deprecated.EmptyByteBuf.setMedium(int index, int value) ReadOnlyByteBuf.setMedium(int index, int value) Deprecated.SwappedByteBuf.setMedium(int index, int value) Deprecated.UnpooledDirectByteBuf.setMedium(int index, int value) UnpooledHeapByteBuf.setMedium(int index, int value) UnpooledUnsafeDirectByteBuf.setMedium(int index, int value) UnpooledUnsafeHeapByteBuf.setMedium(int index, int value) AbstractByteBuf.setMediumLE(int index, int value) abstract ByteBufByteBuf.setMediumLE(int index, int value) Sets the specified 24-bit medium integer at the specified absoluteindexin this buffer in the Little Endian Byte Order.DuplicatedByteBuf.setMediumLE(int index, int value) Deprecated.EmptyByteBuf.setMediumLE(int index, int value) ReadOnlyByteBuf.setMediumLE(int index, int value) Deprecated.SwappedByteBuf.setMediumLE(int index, int value) Deprecated.UnpooledHeapByteBuf.setMediumLE(int index, int value) UnpooledUnsafeHeapByteBuf.setMediumLE(int index, int value) AbstractByteBuf.setShort(int index, int value) abstract ByteBufByteBuf.setShort(int index, int value) Sets the specified 16-bit short integer at the specified absoluteindexin this buffer.DuplicatedByteBuf.setShort(int index, int value) Deprecated.EmptyByteBuf.setShort(int index, int value) ReadOnlyByteBuf.setShort(int index, int value) Deprecated.SwappedByteBuf.setShort(int index, int value) Deprecated.UnpooledDirectByteBuf.setShort(int index, int value) UnpooledHeapByteBuf.setShort(int index, int value) UnpooledUnsafeDirectByteBuf.setShort(int index, int value) UnpooledUnsafeHeapByteBuf.setShort(int index, int value) static ByteBufByteBufUtil.setShortBE(ByteBuf buf, int index, int shortValue) Sets a big-endian 16-bit short integer to the buffer.AbstractByteBuf.setShortLE(int index, int value) abstract ByteBufByteBuf.setShortLE(int index, int value) Sets the specified 16-bit short integer at the specified absoluteindexin this buffer with the Little Endian Byte Order.DuplicatedByteBuf.setShortLE(int index, int value) Deprecated.EmptyByteBuf.setShortLE(int index, int value) ReadOnlyByteBuf.setShortLE(int index, int value) Deprecated.SwappedByteBuf.setShortLE(int index, int value) Deprecated.UnpooledHeapByteBuf.setShortLE(int index, int value) UnpooledUnsafeHeapByteBuf.setShortLE(int index, int value) AbstractByteBuf.setZero(int index, int length) abstract ByteBufByteBuf.setZero(int index, int length) Fills this buffer with NUL (0x00) starting at the specified absoluteindex.EmptyByteBuf.setZero(int index, int length) SwappedByteBuf.setZero(int index, int length) Deprecated.UnpooledUnsafeDirectByteBuf.setZero(int index, int length) UnpooledUnsafeHeapByteBuf.setZero(int index, int length) AbstractByteBuf.skipBytes(int length) abstract ByteBufByteBuf.skipBytes(int length) Increases the currentreaderIndexby the specifiedlengthin this buffer.EmptyByteBuf.skipBytes(int length) SwappedByteBuf.skipBytes(int length) Deprecated.AbstractByteBuf.slice()AbstractByteBuf.slice(int index, int length) abstract ByteBufByteBuf.slice()Returns a slice of this buffer's readable bytes.abstract ByteBufByteBuf.slice(int index, int length) Returns a slice of this buffer's sub-region.DuplicatedByteBuf.slice(int index, int length) Deprecated.EmptyByteBuf.slice()EmptyByteBuf.slice(int index, int length) ReadOnlyByteBuf.slice(int index, int length) Deprecated.SwappedByteBuf.slice()Deprecated.SwappedByteBuf.slice(int index, int length) Deprecated.static ByteBufByteBufUtil.threadLocalDirectBuffer()Returns a cached thread-local direct buffer, if available.protected static ByteBufAbstractByteBufAllocator.toLeakAwareBuffer(ByteBuf buf) final ByteBufAbstractDerivedByteBuf.touch()Deprecated.final ByteBufDeprecated.AbstractReferenceCountedByteBuf.touch()abstract ByteBufByteBuf.touch()abstract ByteBufEmptyByteBuf.touch()SwappedByteBuf.touch()Deprecated.Deprecated.static ByteBufUnpooled.unmodifiableBuffer(ByteBuf buffer) Deprecated.UseasReadOnly().static ByteBufUnpooled.unmodifiableBuffer(ByteBuf... buffers) Deprecated.static ByteBufUnpooled.unreleasableBuffer(ByteBuf buf) Return a unreleasable view on the givenByteBufwhich will just ignore release and retain calls.abstract ByteBufByteBuf.unwrap()Return the underlying buffer instance if this buffer is a wrapper of another buffer.CompositeByteBuf.unwrap()DuplicatedByteBuf.unwrap()Deprecated.EmptyByteBuf.unwrap()ReadOnlyByteBuf.unwrap()Deprecated.SwappedByteBuf.unwrap()Deprecated.UnpooledDirectByteBuf.unwrap()UnpooledHeapByteBuf.unwrap()static ByteBufUnpooled.wrappedBuffer(byte[] array) Creates a new big-endian buffer which wraps the specifiedarray.static ByteBufUnpooled.wrappedBuffer(byte[]... arrays) Creates a new big-endian composite buffer which wraps the specified arrays without copying them.static ByteBufUnpooled.wrappedBuffer(byte[] array, int offset, int length) Creates a new big-endian buffer which wraps the sub-region of the specifiedarray.static ByteBufUnpooled.wrappedBuffer(int maxNumComponents, byte[]... arrays) Creates a new big-endian composite buffer which wraps the specified arrays without copying them.static ByteBufUnpooled.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 ByteBufUnpooled.wrappedBuffer(int maxNumComponents, ByteBuffer... buffers) Creates a new big-endian composite buffer which wraps the slices of the specified NIO buffers without copying them.static ByteBufUnpooled.wrappedBuffer(long memoryAddress, int size, boolean doFree) Creates a new buffer which wraps the specified memory address.static ByteBufUnpooled.wrappedBuffer(ByteBuf buffer) Creates a new buffer which wraps the specified buffer's readable bytes.static ByteBufUnpooled.wrappedBuffer(ByteBuf... buffers) Creates a new big-endian composite buffer which wraps the readable bytes of the specified buffers without copying them.static ByteBufUnpooled.wrappedBuffer(ByteBuffer buffer) Creates a new buffer which wraps the specified NIO buffer's current slice.static ByteBufUnpooled.wrappedBuffer(ByteBuffer... buffers) Creates a new big-endian composite buffer which wraps the slices of the specified NIO buffers without copying them.static ByteBufUnpooled.wrappedUnmodifiableBuffer(ByteBuf... buffers) static ByteBufByteBufUtil.writeAscii(ByteBufAllocator alloc, CharSequence seq) AbstractByteBuf.writeBoolean(boolean value) abstract ByteBufByteBuf.writeBoolean(boolean value) Sets the specified boolean at the currentwriterIndexand increases thewriterIndexby1in this buffer.EmptyByteBuf.writeBoolean(boolean value) SwappedByteBuf.writeBoolean(boolean value) Deprecated.AbstractByteBuf.writeByte(int value) abstract ByteBufByteBuf.writeByte(int value) Sets the specified byte at the currentwriterIndexand increases thewriterIndexby1in this buffer.EmptyByteBuf.writeByte(int value) SwappedByteBuf.writeByte(int value) Deprecated.AbstractByteBuf.writeBytes(byte[] src) AbstractByteBuf.writeBytes(byte[] src, int srcIndex, int length) AbstractByteBuf.writeBytes(ByteBuf src) AbstractByteBuf.writeBytes(ByteBuf src, int length) AbstractByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) AbstractByteBuf.writeBytes(ByteBuffer src) abstract ByteBufByteBuf.writeBytes(byte[] src) Transfers the specified source array's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=src.length).abstract ByteBufByteBuf.writeBytes(byte[] src, int srcIndex, int length) Transfers the specified source array's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.writeBytes(ByteBuf src) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexuntil the source buffer becomes unreadable, and increases thewriterIndexby the number of the transferred bytes.abstract ByteBufByteBuf.writeBytes(ByteBuf src, int length) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.writeBytes(ByteBuffer src) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexuntil the source buffer's position reaches its limit, and increases thewriterIndexby the number of the transferred bytes.EmptyByteBuf.writeBytes(byte[] src) EmptyByteBuf.writeBytes(byte[] src, int srcIndex, int length) EmptyByteBuf.writeBytes(ByteBuf src) EmptyByteBuf.writeBytes(ByteBuf src, int length) EmptyByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) EmptyByteBuf.writeBytes(ByteBuffer src) SwappedByteBuf.writeBytes(byte[] src) Deprecated.SwappedByteBuf.writeBytes(byte[] src, int srcIndex, int length) Deprecated.SwappedByteBuf.writeBytes(ByteBuf src) Deprecated.SwappedByteBuf.writeBytes(ByteBuf src, int length) Deprecated.SwappedByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) Deprecated.SwappedByteBuf.writeBytes(ByteBuffer src) Deprecated.AbstractByteBuf.writeChar(int value) abstract ByteBufByteBuf.writeChar(int value) Sets the specified 2-byte UTF-16 character at the currentwriterIndexand increases thewriterIndexby2in this buffer.EmptyByteBuf.writeChar(int value) SwappedByteBuf.writeChar(int value) Deprecated.AbstractByteBuf.writeDouble(double value) abstract ByteBufByteBuf.writeDouble(double value) Sets the specified 64-bit floating point number at the currentwriterIndexand increases thewriterIndexby8in this buffer.EmptyByteBuf.writeDouble(double value) SwappedByteBuf.writeDouble(double value) Deprecated.ByteBuf.writeDoubleLE(double value) Sets the specified 64-bit floating point number at the currentwriterIndexin Little Endian Byte Order and increases thewriterIndexby8in this buffer.AbstractByteBuf.writeFloat(float value) abstract ByteBufByteBuf.writeFloat(float value) Sets the specified 32-bit floating point number at the currentwriterIndexand increases thewriterIndexby4in this buffer.EmptyByteBuf.writeFloat(float value) SwappedByteBuf.writeFloat(float value) Deprecated.ByteBuf.writeFloatLE(float value) Sets the specified 32-bit floating point number at the currentwriterIndexin Little Endian Byte Order and increases thewriterIndexby4in this buffer.AbstractByteBuf.writeInt(int value) abstract ByteBufByteBuf.writeInt(int value) Sets the specified 32-bit integer at the currentwriterIndexand increases thewriterIndexby4in this buffer.EmptyByteBuf.writeInt(int value) SwappedByteBuf.writeInt(int value) Deprecated.AbstractByteBuf.writeIntLE(int value) abstract ByteBufByteBuf.writeIntLE(int value) Sets the specified 32-bit integer at the currentwriterIndexin the Little Endian Byte Order and increases thewriterIndexby4in this buffer.EmptyByteBuf.writeIntLE(int value) SwappedByteBuf.writeIntLE(int value) Deprecated.AbstractByteBuf.writeLong(long value) abstract ByteBufByteBuf.writeLong(long value) Sets the specified 64-bit long integer at the currentwriterIndexand increases thewriterIndexby8in this buffer.EmptyByteBuf.writeLong(long value) SwappedByteBuf.writeLong(long value) Deprecated.AbstractByteBuf.writeLongLE(long value) abstract ByteBufByteBuf.writeLongLE(long value) Sets the specified 64-bit long integer at the currentwriterIndexin the Little Endian Byte Order and increases thewriterIndexby8in this buffer.EmptyByteBuf.writeLongLE(long value) SwappedByteBuf.writeLongLE(long value) Deprecated.AbstractByteBuf.writeMedium(int value) abstract ByteBufByteBuf.writeMedium(int value) Sets the specified 24-bit medium integer at the currentwriterIndexand increases thewriterIndexby3in this buffer.EmptyByteBuf.writeMedium(int value) SwappedByteBuf.writeMedium(int value) Deprecated.static ByteBufByteBufUtil.writeMediumBE(ByteBuf buf, int mediumValue) Writes a big-endian 24-bit medium integer to the buffer.AbstractByteBuf.writeMediumLE(int value) abstract ByteBufByteBuf.writeMediumLE(int value) Sets the specified 24-bit medium integer at the currentwriterIndexin the Little Endian Byte Order and increases thewriterIndexby3in this buffer.EmptyByteBuf.writeMediumLE(int value) SwappedByteBuf.writeMediumLE(int value) Deprecated.AbstractByteBuf.writerIndex(int writerIndex) abstract ByteBufByteBuf.writerIndex(int writerIndex) Sets thewriterIndexof this buffer.EmptyByteBuf.writerIndex(int writerIndex) SwappedByteBuf.writerIndex(int writerIndex) Deprecated.AbstractByteBuf.writeShort(int value) abstract ByteBufByteBuf.writeShort(int value) Sets the specified 16-bit short integer at the currentwriterIndexand increases thewriterIndexby2in this buffer.EmptyByteBuf.writeShort(int value) SwappedByteBuf.writeShort(int value) Deprecated.static ByteBufByteBufUtil.writeShortBE(ByteBuf buf, int shortValue) Writes a big-endian 16-bit short integer to the buffer.AbstractByteBuf.writeShortLE(int value) abstract ByteBufByteBuf.writeShortLE(int value) Sets the specified 16-bit short integer in the Little Endian Byte Order at the currentwriterIndexand increases thewriterIndexby2in this buffer.EmptyByteBuf.writeShortLE(int value) SwappedByteBuf.writeShortLE(int value) Deprecated.static ByteBufByteBufUtil.writeUtf8(ByteBufAllocator alloc, CharSequence seq) AbstractByteBuf.writeZero(int length) abstract ByteBufByteBuf.writeZero(int length) Fills this buffer with NUL (0x00) starting at the currentwriterIndexand increases thewriterIndexby the specifiedlength.EmptyByteBuf.writeZero(int length) SwappedByteBuf.writeZero(int length) Deprecated.UnpooledUnsafeDirectByteBuf.writeZero(int length) UnpooledUnsafeHeapByteBuf.writeZero(int length) Methods in io.netty.buffer that return types with arguments of type ByteBufModifier and TypeMethodDescriptionCompositeByteBuf.decompose(int offset, int length) Same withAbstractByteBuf.slice(int, int)except that this method returns a list.CompositeByteBuf.iterator()Methods in io.netty.buffer with parameters of type ByteBufModifier and TypeMethodDescriptionCompositeByteBuf.addComponent(boolean increaseWriterIndex, int cIndex, ByteBuf buffer) Add the givenByteBufon the specific index and increase thewriterIndexifincreaseWriterIndexistrue.CompositeByteBuf.addComponent(boolean increaseWriterIndex, ByteBuf buffer) CompositeByteBuf.addComponent(int cIndex, ByteBuf buffer) Add the givenByteBufon the specific index.CompositeByteBuf.addComponent(ByteBuf buffer) Add the givenByteBuf.CompositeByteBuf.addComponents(boolean increaseWriterIndex, ByteBuf... buffers) CompositeByteBuf.addComponents(int cIndex, ByteBuf... buffers) Add the givenByteBufs on the specific indexCompositeByteBuf.addComponents(ByteBuf... buffers) Add the givenByteBufs.CompositeByteBuf.addFlattenedComponents(boolean increaseWriterIndex, ByteBuf buffer) static voidByteBufUtil.appendPrettyHexDump(StringBuilder dump, ByteBuf buf) Appends the prettified multi-line hexadecimal dump of the specifiedByteBufto the specifiedStringBuilderthat is easy to read by humans.static voidByteBufUtil.appendPrettyHexDump(StringBuilder dump, ByteBuf buf, int offset, int length) Appends the prettified multi-line hexadecimal dump of the specifiedByteBufto the specifiedStringBuilderthat is easy to read by humans, starting at the givenoffsetusing the givenlength.static intCompares the two specified buffers as described incompareTo(ByteBuf).intabstract intCompares the content of the specified buffer to the content of this buffer.intintDeprecated.static ByteBufUnpooled.copiedBuffer(ByteBuf buffer) Creates a new buffer whose content is a copy of the specifiedbuffer's readable bytes.static ByteBufUnpooled.copiedBuffer(ByteBuf... buffers) Creates a new buffer whose content is a merged copy of the specifiedbuffers' readable bytes.static voidstatic voidstatic voidstatic ByteBufByteBufUtil.ensureAccessible(ByteBuf buffer) static booleanReturnstrueif and only if the two specified buffers are identical to each other forlengthbytes starting ataStartIndexindex for theabuffer andbStartIndexindex for thebbuffer.static booleanReturnstrueif and only if the two specified buffers are identical to each other as described inequals(Object).abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination becomes non-writable.abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindex.abstract ByteBufTransfers this buffer's data to the specified destination starting at the specified absoluteindex.static byte[]Create a copy of the underlying storage frombufinto a byte array.static byte[]Create a copy of the underlying storage frombufinto a byte array.static byte[]Return an array of the underlying storage frombufinto a byte array.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.static intCalculates the hash code of the specified buffer.static StringReturns a hex dump of the specified buffer's readable bytes.static StringReturns a hex dump of the specified buffer's sub-region.static intThe default implementation ofindexOf(int, int, byte).static intReturns the reader index of needle in haystack, or -1 if needle is not in haystack.static booleanByteBufUtil.isAccessible(ByteBuf buffer) static booleanstatic booleanstatic StringByteBufUtil.prettyHexDump(ByteBuf buffer) Returns a multi-line hexadecimal dump of the specifiedByteBufthat is easy to read by humans.static StringByteBufUtil.prettyHexDump(ByteBuf buffer, int offset, int length) Returns a multi-line hexadecimal dump of the specifiedByteBufthat is easy to read by humans, starting at the givenoffsetusing the givenlength.abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexuntil the destination becomes non-writable, and increases thereaderIndexby the number of the transferred bytes.abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).abstract ByteBufTransfers this buffer's data to the specified destination starting at the currentreaderIndexand increases thereaderIndexby the number of the transferred bytes (=length).static ByteBufByteBufUtil.readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) Read the given amount of bytes into a newByteBufthat is allocated from theByteBufAllocator.Deprecated.Deprecated.Deprecated.static intReads a big-endian 32-bit integer from the buffer.static intByteBufUtil.readUnsignedShortBE(ByteBuf buf) Reads a big-endian unsigned 16-bit short integer from the buffer.Returns a newByteBufHolderwhich contains the specifiedcontent.Returns a newByteBufHolderwhich contains the specifiedcontent.static intByteBufUtil.reserveAndWriteUtf8(ByteBuf buf, CharSequence seq, int reserveBytes) static intByteBufUtil.reserveAndWriteUtf8(ByteBuf buf, CharSequence seq, int start, int end, int reserveBytes) Equivalent tobut avoids subsequence object allocation if possible.reserveAndWriteUtf8(buf, seq.subSequence(start, end), reserveBytes)abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer becomes unreadable.abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex.abstract ByteBufTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.static ByteBufByteBufUtil.setShortBE(ByteBuf buf, int index, int shortValue) Sets a big-endian 16-bit short integer to the buffer.protected static ByteBufAbstractByteBufAllocator.toLeakAwareBuffer(ByteBuf buf) static ByteBufUnpooled.unmodifiableBuffer(ByteBuf buffer) Deprecated.UseasReadOnly().static ByteBufUnpooled.unmodifiableBuffer(ByteBuf... buffers) Deprecated.static ByteBufUnpooled.unreleasableBuffer(ByteBuf buf) Return a unreleasable view on the givenByteBufwhich will just ignore release and retain calls.static ByteBufUnpooled.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 ByteBufUnpooled.wrappedBuffer(ByteBuf buffer) Creates a new buffer which wraps the specified buffer's readable bytes.static ByteBufUnpooled.wrappedBuffer(ByteBuf... buffers) Creates a new big-endian composite buffer which wraps the readable bytes of the specified buffers without copying them.static ByteBufUnpooled.wrappedUnmodifiableBuffer(ByteBuf... buffers) static intByteBufUtil.writeAscii(ByteBuf buf, CharSequence seq) AbstractByteBuf.writeBytes(ByteBuf src) AbstractByteBuf.writeBytes(ByteBuf src, int length) AbstractByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) abstract ByteBufByteBuf.writeBytes(ByteBuf src) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexuntil the source buffer becomes unreadable, and increases thewriterIndexby the number of the transferred bytes.abstract ByteBufByteBuf.writeBytes(ByteBuf src, int length) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).abstract ByteBufByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).CompositeByteBuf.writeBytes(ByteBuf src) CompositeByteBuf.writeBytes(ByteBuf src, int length) CompositeByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) EmptyByteBuf.writeBytes(ByteBuf src) EmptyByteBuf.writeBytes(ByteBuf src, int length) EmptyByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) SwappedByteBuf.writeBytes(ByteBuf src) Deprecated.SwappedByteBuf.writeBytes(ByteBuf src, int length) Deprecated.SwappedByteBuf.writeBytes(ByteBuf src, int srcIndex, int length) Deprecated.static ByteBufByteBufUtil.writeMediumBE(ByteBuf buf, int mediumValue) Writes a big-endian 24-bit medium integer to the buffer.static ByteBufByteBufUtil.writeShortBE(ByteBuf buf, int shortValue) Writes a big-endian 16-bit short integer to the buffer.static intByteBufUtil.writeUtf8(ByteBuf buf, CharSequence seq) static intByteBufUtil.writeUtf8(ByteBuf buf, CharSequence seq, int start, int end) Equivalent tobut avoids subsequence object allocation.writeUtf8(buf, seq.subSequence(start, end))Method parameters in io.netty.buffer with type arguments of type ByteBufModifier and TypeMethodDescriptionCompositeByteBuf.addComponents(boolean increaseWriterIndex, Iterable<ByteBuf> buffers) CompositeByteBuf.addComponents(int cIndex, Iterable<ByteBuf> buffers) Add the givenByteBufs on the specific index Be aware that this method does not increase thewriterIndexof theCompositeByteBuf.CompositeByteBuf.addComponents(Iterable<ByteBuf> buffers) Add the givenByteBufs.Constructors in io.netty.buffer with parameters of type ByteBufModifierConstructorDescriptionByteBufInputStream(ByteBuf buffer) Creates a new stream which reads data from the specifiedbufferstarting at the currentreaderIndexand ending at the currentwriterIndex.ByteBufInputStream(ByteBuf buffer, boolean releaseOnClose) Creates a new stream which reads data from the specifiedbufferstarting at the currentreaderIndexand ending at the currentwriterIndex.ByteBufInputStream(ByteBuf buffer, int length) Creates a new stream which reads data from the specifiedbufferstarting at the currentreaderIndexand ending atreaderIndex + length.ByteBufInputStream(ByteBuf buffer, int length, boolean releaseOnClose) Creates a new stream which reads data from the specifiedbufferstarting at the currentreaderIndexand ending atreaderIndex + length.ByteBufOutputStream(ByteBuf buffer) Creates a new stream which writes data to the specifiedbuffer.CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, ByteBuf... buffers) DefaultByteBufHolder(ByteBuf data) DuplicatedByteBuf(ByteBuf buffer) Deprecated.ReadOnlyByteBuf(ByteBuf buffer) Deprecated.SlicedByteBuf(ByteBuf buffer, int index, int length) Deprecated.SwappedByteBuf(ByteBuf buf) Deprecated.Constructor parameters in io.netty.buffer with type arguments of type ByteBufModifierConstructorDescriptionCompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, Iterable<ByteBuf> buffers)