Class DerivedMutableByteBuf
- java.lang.Object
-
- io.netty.buffer.ByteBuf
-
- io.netty.buffer.AbstractByteBuf
-
- com.linkedin.alpini.base.safealloc.DerivedMutableByteBuf
-
- All Implemented Interfaces:
io.netty.util.ReferenceCounted
,java.lang.Comparable<io.netty.buffer.ByteBuf>
public final class DerivedMutableByteBuf extends io.netty.buffer.AbstractByteBuf
Mutable ByteBuf.
-
-
Constructor Summary
Constructors Constructor Description DerivedMutableByteBuf(io.netty.buffer.ByteBuf buf)
DerivedMutableByteBuf(io.netty.buffer.ByteBuf buf, int offset, int length)
-
Method Summary
All Methods Instance Methods Concrete 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)
io.netty.buffer.ByteBufAllocator
alloc()
byte[]
array()
int
arrayOffset()
io.netty.buffer.ByteBuf
asReadOnly()
int
bytesBefore(byte value)
int
bytesBefore(int length, byte value)
int
bytesBefore(int index, int length, byte value)
int
capacity()
io.netty.buffer.ByteBuf
capacity(int newCapacity)
io.netty.buffer.ByteBuf
copy(int index, int length)
io.netty.buffer.ByteBuf
discardReadBytes()
io.netty.buffer.ByteBuf
discardSomeReadBytes()
io.netty.buffer.ByteBuf
duplicate()
protected io.netty.buffer.ByteBuf
duplicate0()
int
forEachByte(int index, int length, io.netty.util.ByteProcessor processor)
int
forEachByte(io.netty.util.ByteProcessor processor)
int
forEachByteDesc(int index, int length, io.netty.util.ByteProcessor processor)
int
forEachByteDesc(io.netty.util.ByteProcessor processor)
io.netty.buffer.ByteBuf
getBytes(int index, byte[] dst, int dstIndex, int length)
io.netty.buffer.ByteBuf
getBytes(int index, io.netty.buffer.ByteBuf dst, int dstIndex, int length)
io.netty.buffer.ByteBuf
getBytes(int index, java.io.OutputStream out, int length)
io.netty.buffer.ByteBuf
getBytes(int index, java.nio.ByteBuffer dst)
int
getBytes(int index, java.nio.channels.FileChannel out, long position, int length)
int
getBytes(int index, java.nio.channels.GatheringByteChannel out, int length)
boolean
hasArray()
boolean
hasMemoryAddress()
int
indexOf(int fromIndex, int toIndex, byte value)
java.nio.ByteBuffer
internalNioBuffer(int index, int length)
boolean
isDirect()
boolean
isReadOnly()
long
memoryAddress()
java.nio.ByteBuffer
nioBuffer(int index, int length)
int
nioBufferCount()
java.nio.ByteBuffer[]
nioBuffers(int index, int length)
java.nio.ByteOrder
order()
int
refCnt()
boolean
release()
boolean
release(int decrement)
io.netty.buffer.ByteBuf
resetReaderIndex()
io.netty.buffer.ByteBuf
resetWriterIndex()
io.netty.buffer.ByteBuf
retain()
io.netty.buffer.ByteBuf
retain(int increment)
io.netty.buffer.ByteBuf
setBytes(int index, byte[] src, int srcIndex, int length)
io.netty.buffer.ByteBuf
setBytes(int index, io.netty.buffer.ByteBuf src, int srcIndex, int length)
int
setBytes(int index, java.io.InputStream in, int length)
io.netty.buffer.ByteBuf
setBytes(int index, java.nio.ByteBuffer src)
int
setBytes(int index, java.nio.channels.FileChannel in, long position, int length)
int
setBytes(int index, java.nio.channels.ScatteringByteChannel in, int length)
io.netty.buffer.ByteBuf
slice(int index, int length)
protected io.netty.buffer.ByteBuf
slice0(int index, int length)
protected int
start(int index, int length)
java.lang.String
toString(int index, int length, java.nio.charset.Charset charset)
io.netty.buffer.ByteBuf
touch()
io.netty.buffer.ByteBuf
touch(java.lang.Object hint)
io.netty.buffer.ByteBuf
unwrap()
protected io.netty.buffer.ByteBuf
unwrap0()
-
Methods inherited from class io.netty.buffer.AbstractByteBuf
adjustMarkers, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, ensureAccessible, ensureWritable, ensureWritable, equals, 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, 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, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, setZero, skipBytes, slice, 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
-
-
-
-
Method Detail
-
isReadOnly
public final boolean isReadOnly()
- Overrides:
isReadOnly
in classio.netty.buffer.AbstractByteBuf
-
asReadOnly
public final io.netty.buffer.ByteBuf asReadOnly()
- Overrides:
asReadOnly
in classio.netty.buffer.AbstractByteBuf
-
_setByte
protected final void _setByte(int index, int value)
-
_setShort
protected final void _setShort(int index, int value)
-
_setShortLE
protected final void _setShortLE(int index, int value)
-
_setMedium
protected final void _setMedium(int index, int value)
-
_setMediumLE
protected final void _setMediumLE(int index, int value)
-
_setInt
protected final void _setInt(int index, int value)
-
_setIntLE
protected final void _setIntLE(int index, int value)
-
_setLong
protected final void _setLong(int index, long value)
-
_setLongLE
protected final void _setLongLE(int index, long value)
-
duplicate0
protected io.netty.buffer.ByteBuf duplicate0()
-
slice0
protected io.netty.buffer.ByteBuf slice0(int index, int length)
-
setBytes
public final io.netty.buffer.ByteBuf setBytes(int index, io.netty.buffer.ByteBuf src, int srcIndex, int length)
-
setBytes
public final io.netty.buffer.ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)
-
setBytes
public final io.netty.buffer.ByteBuf setBytes(int index, java.nio.ByteBuffer src)
-
setBytes
public final int setBytes(int index, java.io.InputStream in, int length) throws java.io.IOException
- Throws:
java.io.IOException
-
setBytes
public final int setBytes(int index, java.nio.channels.ScatteringByteChannel in, int length) throws java.io.IOException
- Throws:
java.io.IOException
-
setBytes
public final int setBytes(int index, java.nio.channels.FileChannel in, long position, int length) throws java.io.IOException
- Throws:
java.io.IOException
-
copy
public io.netty.buffer.ByteBuf copy(int index, int length)
-
start
protected final int start(int index, int length)
-
resetReaderIndex
public io.netty.buffer.ByteBuf resetReaderIndex()
- Overrides:
resetReaderIndex
in classio.netty.buffer.AbstractByteBuf
-
resetWriterIndex
public io.netty.buffer.ByteBuf resetWriterIndex()
- Overrides:
resetWriterIndex
in classio.netty.buffer.AbstractByteBuf
-
_getByte
protected final byte _getByte(int index)
- Specified by:
_getByte
in classio.netty.buffer.AbstractByteBuf
-
_getShort
protected final short _getShort(int index)
- Specified by:
_getShort
in classio.netty.buffer.AbstractByteBuf
-
_getShortLE
protected final short _getShortLE(int index)
- Specified by:
_getShortLE
in classio.netty.buffer.AbstractByteBuf
-
_getUnsignedMedium
protected final int _getUnsignedMedium(int index)
- Specified by:
_getUnsignedMedium
in classio.netty.buffer.AbstractByteBuf
-
_getUnsignedMediumLE
protected final int _getUnsignedMediumLE(int index)
- Specified by:
_getUnsignedMediumLE
in classio.netty.buffer.AbstractByteBuf
-
_getInt
protected final int _getInt(int index)
- Specified by:
_getInt
in classio.netty.buffer.AbstractByteBuf
-
_getIntLE
protected final int _getIntLE(int index)
- Specified by:
_getIntLE
in classio.netty.buffer.AbstractByteBuf
-
_getLong
protected final long _getLong(int index)
- Specified by:
_getLong
in classio.netty.buffer.AbstractByteBuf
-
_getLongLE
protected final long _getLongLE(int index)
- Specified by:
_getLongLE
in classio.netty.buffer.AbstractByteBuf
-
duplicate
public final io.netty.buffer.ByteBuf duplicate()
- Overrides:
duplicate
in classio.netty.buffer.AbstractByteBuf
-
slice
public final io.netty.buffer.ByteBuf slice(int index, int length)
- Overrides:
slice
in classio.netty.buffer.AbstractByteBuf
-
toString
public final java.lang.String toString(int index, int length, java.nio.charset.Charset charset)
- Overrides:
toString
in classio.netty.buffer.AbstractByteBuf
-
indexOf
public final int indexOf(int fromIndex, int toIndex, byte value)
- Overrides:
indexOf
in classio.netty.buffer.AbstractByteBuf
-
bytesBefore
public int bytesBefore(byte value)
- Overrides:
bytesBefore
in classio.netty.buffer.AbstractByteBuf
-
bytesBefore
public int bytesBefore(int length, byte value)
- Overrides:
bytesBefore
in classio.netty.buffer.AbstractByteBuf
-
bytesBefore
public int bytesBefore(int index, int length, byte value)
- Overrides:
bytesBefore
in classio.netty.buffer.AbstractByteBuf
-
forEachByte
public int forEachByte(io.netty.util.ByteProcessor processor)
- Overrides:
forEachByte
in classio.netty.buffer.AbstractByteBuf
-
forEachByte
public int forEachByte(int index, int length, io.netty.util.ByteProcessor processor)
- Overrides:
forEachByte
in classio.netty.buffer.AbstractByteBuf
-
forEachByteDesc
public int forEachByteDesc(io.netty.util.ByteProcessor processor)
- Overrides:
forEachByteDesc
in classio.netty.buffer.AbstractByteBuf
-
forEachByteDesc
public int forEachByteDesc(int index, int length, io.netty.util.ByteProcessor processor)
- Overrides:
forEachByteDesc
in classio.netty.buffer.AbstractByteBuf
-
capacity
public int capacity()
- Specified by:
capacity
in classio.netty.buffer.ByteBuf
-
capacity
public io.netty.buffer.ByteBuf capacity(int newCapacity)
- Specified by:
capacity
in classio.netty.buffer.ByteBuf
-
alloc
public final io.netty.buffer.ByteBufAllocator alloc()
- Specified by:
alloc
in classio.netty.buffer.ByteBuf
-
order
public final java.nio.ByteOrder order()
- Specified by:
order
in classio.netty.buffer.ByteBuf
-
unwrap
public io.netty.buffer.ByteBuf unwrap()
- Specified by:
unwrap
in classio.netty.buffer.ByteBuf
-
unwrap0
protected io.netty.buffer.ByteBuf unwrap0()
-
isDirect
public final boolean isDirect()
- Specified by:
isDirect
in classio.netty.buffer.ByteBuf
-
getBytes
public final io.netty.buffer.ByteBuf getBytes(int index, io.netty.buffer.ByteBuf dst, int dstIndex, int length)
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
-
getBytes
public final io.netty.buffer.ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length)
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
-
getBytes
public final io.netty.buffer.ByteBuf getBytes(int index, java.nio.ByteBuffer dst)
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
-
getBytes
public final io.netty.buffer.ByteBuf getBytes(int index, java.io.OutputStream out, int length) throws java.io.IOException
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
- Throws:
java.io.IOException
-
getBytes
public final int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
- Throws:
java.io.IOException
-
getBytes
public final int getBytes(int index, java.nio.channels.FileChannel out, long position, int length) throws java.io.IOException
- Specified by:
getBytes
in classio.netty.buffer.ByteBuf
- Throws:
java.io.IOException
-
nioBufferCount
public final int nioBufferCount()
- Specified by:
nioBufferCount
in classio.netty.buffer.ByteBuf
-
nioBuffer
public final java.nio.ByteBuffer nioBuffer(int index, int length)
- Specified by:
nioBuffer
in classio.netty.buffer.ByteBuf
-
internalNioBuffer
public final java.nio.ByteBuffer internalNioBuffer(int index, int length)
- Specified by:
internalNioBuffer
in classio.netty.buffer.ByteBuf
-
nioBuffers
public final java.nio.ByteBuffer[] nioBuffers(int index, int length)
- Specified by:
nioBuffers
in classio.netty.buffer.ByteBuf
-
hasArray
public final boolean hasArray()
- Specified by:
hasArray
in classio.netty.buffer.ByteBuf
-
array
public final byte[] array()
- Specified by:
array
in classio.netty.buffer.ByteBuf
-
arrayOffset
public final int arrayOffset()
- Specified by:
arrayOffset
in classio.netty.buffer.ByteBuf
-
hasMemoryAddress
public boolean hasMemoryAddress()
- Specified by:
hasMemoryAddress
in classio.netty.buffer.ByteBuf
-
memoryAddress
public long memoryAddress()
- Specified by:
memoryAddress
in classio.netty.buffer.ByteBuf
-
retain
public io.netty.buffer.ByteBuf retain(int increment)
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Specified by:
retain
in classio.netty.buffer.ByteBuf
-
refCnt
public int refCnt()
-
retain
public io.netty.buffer.ByteBuf retain()
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Specified by:
retain
in classio.netty.buffer.ByteBuf
-
touch
public io.netty.buffer.ByteBuf touch()
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Specified by:
touch
in classio.netty.buffer.ByteBuf
-
touch
public io.netty.buffer.ByteBuf touch(java.lang.Object hint)
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Specified by:
touch
in classio.netty.buffer.ByteBuf
-
release
public boolean release()
-
release
public boolean release(int decrement)
-
discardReadBytes
public io.netty.buffer.ByteBuf discardReadBytes()
- Overrides:
discardReadBytes
in classio.netty.buffer.AbstractByteBuf
-
discardSomeReadBytes
public io.netty.buffer.ByteBuf discardSomeReadBytes()
- Overrides:
discardSomeReadBytes
in classio.netty.buffer.AbstractByteBuf
-
-