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:
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 privatePooledUnsafeHeapByteBuf(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 SwappedByteBufnewSwappedByteBuf()Deprecated.(package private) static PooledUnsafeHeapByteBufnewUnsafeInstance(int maxCapacity)ByteBufsetZero(int index, int length)Fills this buffer with NUL (0x00) starting at the specified absoluteindex.ByteBufwriteZero(int length)Fills this buffer with NUL (0x00) starting at the currentwriterIndexand increases thewriterIndexby 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
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:
_getBytein classPooledHeapByteBuf
-
_getShort
protected short _getShort(int index)
- Overrides:
_getShortin classPooledHeapByteBuf
-
_getShortLE
protected short _getShortLE(int index)
- Overrides:
_getShortLEin classPooledHeapByteBuf
-
_getUnsignedMedium
protected int _getUnsignedMedium(int index)
- Overrides:
_getUnsignedMediumin classPooledHeapByteBuf
-
_getUnsignedMediumLE
protected int _getUnsignedMediumLE(int index)
- Overrides:
_getUnsignedMediumLEin classPooledHeapByteBuf
-
_getInt
protected int _getInt(int index)
- Overrides:
_getIntin classPooledHeapByteBuf
-
_getIntLE
protected int _getIntLE(int index)
- Overrides:
_getIntLEin classPooledHeapByteBuf
-
_getLong
protected long _getLong(int index)
- Overrides:
_getLongin classPooledHeapByteBuf
-
_getLongLE
protected long _getLongLE(int index)
- Overrides:
_getLongLEin classPooledHeapByteBuf
-
_setByte
protected void _setByte(int index, int value)- Overrides:
_setBytein classPooledHeapByteBuf
-
_setShort
protected void _setShort(int index, int value)- Overrides:
_setShortin classPooledHeapByteBuf
-
_setShortLE
protected void _setShortLE(int index, int value)- Overrides:
_setShortLEin classPooledHeapByteBuf
-
_setMedium
protected void _setMedium(int index, int value)- Overrides:
_setMediumin classPooledHeapByteBuf
-
_setMediumLE
protected void _setMediumLE(int index, int value)- Overrides:
_setMediumLEin classPooledHeapByteBuf
-
_setInt
protected void _setInt(int index, int value)- Overrides:
_setIntin classPooledHeapByteBuf
-
_setIntLE
protected void _setIntLE(int index, int value)- Overrides:
_setIntLEin classPooledHeapByteBuf
-
_setLong
protected void _setLong(int index, long value)- Overrides:
_setLongin classPooledHeapByteBuf
-
_setLongLE
protected void _setLongLE(int index, long value)- Overrides:
_setLongLEin classPooledHeapByteBuf
-
setZero
public ByteBuf setZero(int index, int length)
Description copied from class:ByteBufFills this buffer with NUL (0x00) starting at the specified absoluteindex. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setZeroin classAbstractByteBuflength- the number of NULs to write to the buffer
-
writeZero
public ByteBuf writeZero(int length)
Description copied from class:ByteBufFills this buffer with NUL (0x00) starting at the currentwriterIndexand increases thewriterIndexby the specifiedlength. Ifthis.writableBytesis less thanlength,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeZeroin classAbstractByteBuf- Parameters:
length- the number of NULs to write to the buffer
-
newSwappedByteBuf
@Deprecated protected SwappedByteBuf newSwappedByteBuf()
Deprecated.Description copied from class:AbstractByteBufCreates a newSwappedByteBuffor thisByteBufinstance.- Overrides:
newSwappedByteBufin classAbstractByteBuf
-
-