Package io.netty.buffer
Class PooledUnsafeHeapByteBuf
- java.lang.Object
-
- io.netty.buffer.ByteBuf
-
- io.netty.buffer.AbstractByteBuf
-
- io.netty.buffer.AbstractReferenceCountedByteBuf
-
- io.netty.buffer.PooledByteBuf<byte[]>
-
- io.netty.buffer.PooledHeapByteBuf
-
- io.netty.buffer.PooledUnsafeHeapByteBuf
-
- All Implemented Interfaces:
ByteBufConvertible
,ReferenceCounted
,java.lang.Comparable<ByteBuf>
final class PooledUnsafeHeapByteBuf extends PooledHeapByteBuf
-
-
Field Summary
Fields Modifier and Type Field Description private static ObjectPool<PooledUnsafeHeapByteBuf>
RECYCLER
-
Fields inherited from class io.netty.buffer.PooledByteBuf
cache, chunk, handle, length, maxLength, memory, offset, tmpNioBuf
-
Fields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PooledUnsafeHeapByteBuf(ObjectPool.Handle<PooledUnsafeHeapByteBuf> recyclerHandle, int maxCapacity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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)
protected SwappedByteBuf
newSwappedByteBuf()
Deprecated.(package private) static PooledUnsafeHeapByteBuf
newUnsafeInstance(int maxCapacity)
ByteBuf
setZero(int index, int length)
Fills this buffer with NUL (0x00) starting at the specified absoluteindex
.ByteBuf
writeZero(int length)
Fills this buffer with NUL (0x00) starting at the currentwriterIndex
and increases thewriterIndex
by the specifiedlength
.-
Methods inherited from class io.netty.buffer.PooledHeapByteBuf
array, arrayOffset, copy, duplicateInternalNioBuffer, getBytes, getBytes, getBytes, getBytes, hasArray, hasMemoryAddress, isDirect, memoryAddress, newInstance, newInternalNioBuffer, setBytes, setBytes, setBytes, setBytes
-
Methods inherited from class io.netty.buffer.PooledByteBuf
_internalNioBuffer, alloc, capacity, capacity, deallocate, getBytes, getBytes, idx, init, initUnpooled, internalNioBuffer, internalNioBuffer, isContiguous, maxFastWritableBytes, nioBuffer, nioBufferCount, nioBuffers, order, readBytes, readBytes, retainedDuplicate, retainedSlice, retainedSlice, reuse, setBytes, setBytes, unwrap
-
Methods inherited from class io.netty.buffer.AbstractReferenceCountedByteBuf
isAccessible, refCnt, release, release, resetRefCnt, retain, retain, setRefCnt, touch, touch
-
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, duplicate, ensureAccessible, ensureWritable, ensureWritable, ensureWritable0, equals, forEachByte, forEachByte, forEachByteAsc0, forEachByteDesc, forEachByteDesc, forEachByteDesc0, getBoolean, getByte, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, 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, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, skipBytes, slice, 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
-
Methods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
-
-
-
Field Detail
-
RECYCLER
private static final ObjectPool<PooledUnsafeHeapByteBuf> RECYCLER
-
-
Constructor Detail
-
PooledUnsafeHeapByteBuf
private PooledUnsafeHeapByteBuf(ObjectPool.Handle<PooledUnsafeHeapByteBuf> recyclerHandle, int maxCapacity)
-
-
Method Detail
-
newUnsafeInstance
static PooledUnsafeHeapByteBuf newUnsafeInstance(int maxCapacity)
-
_getByte
protected byte _getByte(int index)
- Overrides:
_getByte
in classPooledHeapByteBuf
-
_getShort
protected short _getShort(int index)
- Overrides:
_getShort
in classPooledHeapByteBuf
-
_getShortLE
protected short _getShortLE(int index)
- Overrides:
_getShortLE
in classPooledHeapByteBuf
-
_getUnsignedMedium
protected int _getUnsignedMedium(int index)
- Overrides:
_getUnsignedMedium
in classPooledHeapByteBuf
-
_getUnsignedMediumLE
protected int _getUnsignedMediumLE(int index)
- Overrides:
_getUnsignedMediumLE
in classPooledHeapByteBuf
-
_getInt
protected int _getInt(int index)
- Overrides:
_getInt
in classPooledHeapByteBuf
-
_getIntLE
protected int _getIntLE(int index)
- Overrides:
_getIntLE
in classPooledHeapByteBuf
-
_getLong
protected long _getLong(int index)
- Overrides:
_getLong
in classPooledHeapByteBuf
-
_getLongLE
protected long _getLongLE(int index)
- Overrides:
_getLongLE
in classPooledHeapByteBuf
-
_setByte
protected void _setByte(int index, int value)
- Overrides:
_setByte
in classPooledHeapByteBuf
-
_setShort
protected void _setShort(int index, int value)
- Overrides:
_setShort
in classPooledHeapByteBuf
-
_setShortLE
protected void _setShortLE(int index, int value)
- Overrides:
_setShortLE
in classPooledHeapByteBuf
-
_setMedium
protected void _setMedium(int index, int value)
- Overrides:
_setMedium
in classPooledHeapByteBuf
-
_setMediumLE
protected void _setMediumLE(int index, int value)
- Overrides:
_setMediumLE
in classPooledHeapByteBuf
-
_setInt
protected void _setInt(int index, int value)
- Overrides:
_setInt
in classPooledHeapByteBuf
-
_setIntLE
protected void _setIntLE(int index, int value)
- Overrides:
_setIntLE
in classPooledHeapByteBuf
-
_setLong
protected void _setLong(int index, long value)
- Overrides:
_setLong
in classPooledHeapByteBuf
-
_setLongLE
protected void _setLongLE(int index, long value)
- Overrides:
_setLongLE
in classPooledHeapByteBuf
-
setZero
public ByteBuf setZero(int index, int length)
Description copied from class:ByteBuf
Fills this buffer with NUL (0x00) starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setZero
in classAbstractByteBuf
length
- the number of NULs to write to the buffer
-
writeZero
public ByteBuf writeZero(int length)
Description copied from class:ByteBuf
Fills this buffer with NUL (0x00) starting at the currentwriterIndex
and increases thewriterIndex
by the specifiedlength
. Ifthis.writableBytes
is less thanlength
,ByteBuf.ensureWritable(int)
will be called in an attempt to expand capacity to accommodate.- Overrides:
writeZero
in classAbstractByteBuf
- Parameters:
length
- the number of NULs to write to the buffer
-
newSwappedByteBuf
@Deprecated protected SwappedByteBuf newSwappedByteBuf()
Deprecated.Description copied from class:AbstractByteBuf
Creates a newSwappedByteBuf
for thisByteBuf
instance.- Overrides:
newSwappedByteBuf
in classAbstractByteBuf
-
-