Class AbstractPooledDerivedByteBuf.PooledNonRetainedSlicedByteBuf
- All Implemented Interfaces:
ByteBufConvertible,ReferenceCounted,Comparable<ByteBuf>
- Enclosing class:
AbstractPooledDerivedByteBuf
-
Field Summary
FieldsFields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex -
Constructor Summary
ConstructorsConstructorDescriptionPooledNonRetainedSlicedByteBuf(ByteBuf referenceCountDelegate, AbstractByteBuf buffer, int index, int length) -
Method Summary
Modifier and TypeMethodDescriptionReturns a buffer which shares the whole region of this buffer.(package private) boolean(package private) intrefCnt0()(package private) booleanrelease0()(package private) booleanrelease0(int decrement) (package private) ByteBufretain0()(package private) ByteBufretain0(int increment) Returns a retained buffer which shares the whole region of this buffer.Returns a retained slice of this buffer's readable bytes.retainedSlice(int index, int length) Returns a retained slice of this buffer's sub-region.slice(int index, int length) Returns a slice of this buffer's sub-region.(package private) ByteBuftouch0()(package private) ByteBufMethods inherited from class io.netty.buffer.UnpooledSlicedByteBuf
_getByte, _getInt, _getIntLE, _getLong, _getLongLE, _getShort, _getShortLE, _getUnsignedMedium, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, capacity, unwrapMethods inherited from class io.netty.buffer.AbstractUnpooledSlicedByteBuf
alloc, array, arrayOffset, capacity, checkSliceOutOfBounds, copy, 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, setShortLEMethods inherited from class io.netty.buffer.AbstractDerivedByteBuf
internalNioBuffer, isAccessible, isContiguous, isReadOnly, refCnt, release, release, retain, retain, touch, touchMethods 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, 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, writeZeroMethods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
Field Details
-
referenceCountDelegate
-
-
Constructor Details
-
PooledNonRetainedSlicedByteBuf
PooledNonRetainedSlicedByteBuf(ByteBuf referenceCountDelegate, AbstractByteBuf buffer, int index, int length)
-
-
Method Details
-
isAccessible0
boolean isAccessible0()- Overrides:
isAccessible0in classAbstractDerivedByteBuf
-
refCnt0
int refCnt0()- Overrides:
refCnt0in classAbstractDerivedByteBuf
-
retain0
ByteBuf retain0()- Overrides:
retain0in classAbstractDerivedByteBuf
-
retain0
- Overrides:
retain0in classAbstractDerivedByteBuf
-
touch0
ByteBuf touch0()- Overrides:
touch0in classAbstractDerivedByteBuf
-
touch0
- Overrides:
touch0in classAbstractDerivedByteBuf
-
release0
boolean release0()- Overrides:
release0in classAbstractDerivedByteBuf
-
release0
boolean release0(int decrement) - Overrides:
release0in classAbstractDerivedByteBuf
-
duplicate
Description copied from class:ByteBufReturns a buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.The reader and writer marks will not be duplicated. Also be aware that this method will NOT call
ByteBuf.retain()and so the reference count will NOT be increased.- Overrides:
duplicatein classAbstractUnpooledSlicedByteBuf- Returns:
- A buffer whose readable content is equivalent to the buffer returned by
ByteBuf.slice(). However this buffer will share the capacity of the underlying buffer, and therefore allows access to all of the underlying content if necessary.
-
retainedDuplicate
Description copied from class:ByteBufReturns a retained buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method is identical tobuf.slice(0, buf.capacity()). This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int). This method behaves similarly toduplicate().retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedDuplicatein classAbstractUnpooledSlicedByteBuf
-
slice
Description copied from class:ByteBufReturns a slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.Also be aware that this method will NOT call
ByteBuf.retain()and so the reference count will NOT be increased.- Overrides:
slicein classAbstractUnpooledSlicedByteBuf
-
retainedSlice
Description copied from class:ByteBufReturns a retained slice of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method is identical tobuf.slice(buf.readerIndex(), buf.readableBytes()). This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(). This method behaves similarly toslice().retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedSlicein classAbstractByteBuf
-
retainedSlice
Description copied from class:ByteBufReturns a retained slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int). This method behaves similarly toslice(...).retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedSlicein classAbstractByteBuf
-