Package io.netty.buffer
Class UnpooledSlicedByteBuf
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.AbstractByteBuf
io.netty.buffer.AbstractDerivedByteBuf
io.netty.buffer.AbstractUnpooledSlicedByteBuf
io.netty.buffer.UnpooledSlicedByteBuf
- All Implemented Interfaces:
ByteBufConvertible
,ReferenceCounted
,Comparable<ByteBuf>
- Direct Known Subclasses:
AbstractPooledDerivedByteBuf.PooledNonRetainedSlicedByteBuf
A special
AbstractUnpooledSlicedByteBuf
that can make optimizations because it knows the sliced buffer is of
type AbstractByteBuf
.-
Field Summary
Fields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte
_getByte
(int index) protected int
_getInt
(int index) protected int
_getIntLE
(int index) protected long
_getLong
(int index) protected long
_getLongLE
(int index) protected short
_getShort
(int index) protected short
_getShortLE
(int index) protected int
_getUnsignedMedium
(int index) protected int
_getUnsignedMediumLE
(int index) protected void
_setByte
(int index, int value) protected void
_setInt
(int index, int value) protected void
_setIntLE
(int index, int value) protected void
_setLong
(int index, long value) protected void
_setLongLE
(int index, long value) protected void
_setMedium
(int index, int value) protected void
_setMediumLE
(int index, int value) protected void
_setShort
(int index, int value) protected void
_setShortLE
(int index, int value) int
capacity()
Returns the number of bytes (octets) this buffer can contain.unwrap()
Return the underlying buffer instance if this buffer is a wrapper of another buffer.Methods inherited from class io.netty.buffer.AbstractUnpooledSlicedByteBuf
alloc, array, arrayOffset, capacity, checkSliceOutOfBounds, copy, duplicate, forEachByte, forEachByteDesc, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getCharSequence, getInt, getIntLE, getLong, getLongLE, getShort, getShortLE, getUnsignedMedium, getUnsignedMediumLE, hasArray, hasMemoryAddress, idx, initLength, isDirect, length, memoryAddress, nioBuffer, nioBufferCount, nioBuffers, order, setByte, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, slice
Methods inherited from class io.netty.buffer.AbstractDerivedByteBuf
internalNioBuffer, isAccessible, isAccessible0, isContiguous, isReadOnly, refCnt, refCnt0, release, release, release0, release0, retain, retain, retain0, retain0, touch, touch, touch0, touch0
Methods inherited from class io.netty.buffer.AbstractByteBuf
adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, ensureAccessible, ensureWritable, ensureWritable, ensureWritable0, equals, forEachByte, forEachByteAsc0, forEachByteDesc, forEachByteDesc0, getBoolean, getBytes, getBytes, getBytes, getChar, getDouble, getFloat, getMedium, getMediumLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setZero, skipBytes, slice, toString, toString, toString, trimIndicesToCapacity, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
Methods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
Constructor Details
-
UnpooledSlicedByteBuf
UnpooledSlicedByteBuf(AbstractByteBuf buffer, int index, int length)
-
-
Method Details
-
capacity
public int capacity()Description copied from class:ByteBuf
Returns the number of bytes (octets) this buffer can contain. -
unwrap
Description copied from class:ByteBuf
Return the underlying buffer instance if this buffer is a wrapper of another buffer.- Overrides:
unwrap
in classAbstractUnpooledSlicedByteBuf
- Returns:
null
if this buffer is not a wrapper
-
_getByte
protected byte _getByte(int index) - Overrides:
_getByte
in classAbstractUnpooledSlicedByteBuf
-
_getShort
protected short _getShort(int index) - Overrides:
_getShort
in classAbstractUnpooledSlicedByteBuf
-
_getShortLE
protected short _getShortLE(int index) - Overrides:
_getShortLE
in classAbstractUnpooledSlicedByteBuf
-
_getUnsignedMedium
protected int _getUnsignedMedium(int index) - Overrides:
_getUnsignedMedium
in classAbstractUnpooledSlicedByteBuf
-
_getUnsignedMediumLE
protected int _getUnsignedMediumLE(int index) - Overrides:
_getUnsignedMediumLE
in classAbstractUnpooledSlicedByteBuf
-
_getInt
protected int _getInt(int index) - Overrides:
_getInt
in classAbstractUnpooledSlicedByteBuf
-
_getIntLE
protected int _getIntLE(int index) - Overrides:
_getIntLE
in classAbstractUnpooledSlicedByteBuf
-
_getLong
protected long _getLong(int index) - Overrides:
_getLong
in classAbstractUnpooledSlicedByteBuf
-
_getLongLE
protected long _getLongLE(int index) - Overrides:
_getLongLE
in classAbstractUnpooledSlicedByteBuf
-
_setByte
protected void _setByte(int index, int value) - Overrides:
_setByte
in classAbstractUnpooledSlicedByteBuf
-
_setShort
protected void _setShort(int index, int value) - Overrides:
_setShort
in classAbstractUnpooledSlicedByteBuf
-
_setShortLE
protected void _setShortLE(int index, int value) - Overrides:
_setShortLE
in classAbstractUnpooledSlicedByteBuf
-
_setMedium
protected void _setMedium(int index, int value) - Overrides:
_setMedium
in classAbstractUnpooledSlicedByteBuf
-
_setMediumLE
protected void _setMediumLE(int index, int value) - Overrides:
_setMediumLE
in classAbstractUnpooledSlicedByteBuf
-
_setInt
protected void _setInt(int index, int value) - Overrides:
_setInt
in classAbstractUnpooledSlicedByteBuf
-
_setIntLE
protected void _setIntLE(int index, int value) - Overrides:
_setIntLE
in classAbstractUnpooledSlicedByteBuf
-
_setLong
protected void _setLong(int index, long value) - Overrides:
_setLong
in classAbstractUnpooledSlicedByteBuf
-
_setLongLE
protected void _setLongLE(int index, long value) - Overrides:
_setLongLE
in classAbstractUnpooledSlicedByteBuf
-