Package io.netty.buffer
Class NettyArrowBuf
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.AbstractByteBuf
io.netty.buffer.NettyArrowBuf
- All Implemented Interfaces:
io.netty.buffer.ByteBufConvertible,io.netty.util.ReferenceCounted,AutoCloseable,Comparable<io.netty.buffer.ByteBuf>
Netty specific wrapper over ArrowBuf for use in Netty framework.
-
Constructor Summary
ConstructorsConstructorDescriptionNettyArrowBuf(ArrowBuf arrowBuf, BufferAllocator bufferAllocator, int length) Deprecated, for removal: This API element is subject to removal in a future version.NettyArrowBuf(ArrowBuf arrowBuf, BufferAllocator bufferAllocator, long length) Constructs a new instance. -
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) 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) alloc()byte[]array()intarrowBuf()intcapacity()io.netty.buffer.ByteBufcapacity(int newCapacity) voidclose()io.netty.buffer.ByteBufcopy()io.netty.buffer.ByteBufcopy(int index, int length) bytegetByte(int index) io.netty.buffer.ByteBufgetBytes(int index, byte[] dst, int dstIndex, int length) io.netty.buffer.ByteBufgetBytes(int index, io.netty.buffer.ByteBuf dst, int dstIndex, int length) io.netty.buffer.ByteBufgetBytes(int index, OutputStream out, int length) io.netty.buffer.ByteBufgetBytes(int index, ByteBuffer dst) intgetBytes(int index, FileChannel out, long position, int length) intgetBytes(int index, GatheringByteChannel out, int length) intgetInt(int index) longgetLong(int index) shortgetShort(int index) booleanhasArray()booleaninternalNioBuffer(int index, int length) booleanisDirect()longnioBuffer(int index, int length) Returns a buffer that is zero positioned but points to a slice of the original buffer starting at given index.nioBuffer(long index, int length) Returns a buffer that is zero positioned but points to a slice of the original buffer starting at given index.intnioBuffers(int index, int length) order()io.netty.buffer.ByteBufreaderIndex(int readerIndex) intrefCnt()booleanrelease()booleanrelease(int decrement) io.netty.buffer.ByteBufretain()io.netty.buffer.ByteBufretain(int increment) setByte(int index, int value) io.netty.buffer.ByteBufsetBytes(int index, byte[] src, int srcIndex, int length) io.netty.buffer.ByteBufsetBytes(int index, io.netty.buffer.ByteBuf src, int srcIndex, int length) intsetBytes(int index, InputStream in, int length) io.netty.buffer.ByteBufsetBytes(int index, ByteBuffer src) intsetBytes(int index, FileChannel in, long position, int length) intsetBytes(int index, ScatteringByteChannel in, int length) setInt(int index, int value) setLong(int index, long value) setMedium(int index, int value) setShort(int index, int value) slice()slice(int index, int length) io.netty.buffer.ByteBuftouch()io.netty.buffer.ByteBufio.netty.buffer.ByteBufunwrap()static NettyArrowBufunwrapBuffer(ArrowBuf buf) unwrap arrow buffer into a netty buffer.writerIndex(int writerIndex) Methods inherited from class io.netty.buffer.AbstractByteBuf
adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getIntLE, getLongLE, getMedium, getMediumLE, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, 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, setIntLE, setLongLE, setMediumLE, setShortLE, setZero, skipBytes, 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, writeShort, writeShortLE, writeZeroMethods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, isContiguous, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
Constructor Details
-
NettyArrowBuf
@Deprecated(forRemoval=true) public NettyArrowBuf(ArrowBuf arrowBuf, BufferAllocator bufferAllocator, int length) Deprecated, for removal: This API element is subject to removal in a future version.UseNettyArrowBuf(ArrowBuf, BufferAllocator, long)instead.Constructs a new instance.- Parameters:
arrowBuf- The buffer to wrap.bufferAllocator- The allocator for the buffer.length- The length of this buffer.
-
NettyArrowBuf
Constructs a new instance.- Parameters:
arrowBuf- The buffer to wrap.bufferAllocator- The allocator for the buffer.length- The length of this buffer.
-
-
Method Details
-
copy
public io.netty.buffer.ByteBuf copy()- Overrides:
copyin classio.netty.buffer.AbstractByteBuf
-
copy
public io.netty.buffer.ByteBuf copy(int index, int length) - Specified by:
copyin classio.netty.buffer.ByteBuf
-
retain
public io.netty.buffer.ByteBuf retain()- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Specified by:
retainin classio.netty.buffer.ByteBuf
-
arrowBuf
-
retain
public io.netty.buffer.ByteBuf retain(int increment) - Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Specified by:
retainin classio.netty.buffer.ByteBuf
-
isDirect
public boolean isDirect()- Specified by:
isDirectin classio.netty.buffer.ByteBuf
-
capacity
public io.netty.buffer.ByteBuf capacity(int newCapacity) - Specified by:
capacityin classio.netty.buffer.ByteBuf
-
unwrap
public io.netty.buffer.ByteBuf unwrap()- Specified by:
unwrapin classio.netty.buffer.ByteBuf
-
refCnt
public int refCnt()- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
alloc
- Specified by:
allocin classio.netty.buffer.ByteBuf
-
hasArray
public boolean hasArray()- Specified by:
hasArrayin classio.netty.buffer.ByteBuf
-
array
public byte[] array()- Specified by:
arrayin classio.netty.buffer.ByteBuf
-
arrayOffset
public int arrayOffset()- Specified by:
arrayOffsetin classio.netty.buffer.ByteBuf
-
hasMemoryAddress
public boolean hasMemoryAddress()- Specified by:
hasMemoryAddressin classio.netty.buffer.ByteBuf
-
memoryAddress
public long memoryAddress()- Specified by:
memoryAddressin classio.netty.buffer.ByteBuf
-
touch
public io.netty.buffer.ByteBuf touch()- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Specified by:
touchin classio.netty.buffer.ByteBuf
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Specified by:
touchin classio.netty.buffer.ByteBuf
-
capacity
public int capacity()- Specified by:
capacityin classio.netty.buffer.ByteBuf
-
slice
- Overrides:
slicein classio.netty.buffer.AbstractByteBuf
-
slice
- Overrides:
slicein classio.netty.buffer.AbstractByteBuf
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
release
public boolean release()- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int decrement) - Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
readerIndex
- Overrides:
readerIndexin classio.netty.buffer.AbstractByteBuf
-
writerIndex
- Overrides:
writerIndexin classio.netty.buffer.AbstractByteBuf
-
nioBufferCount
public int nioBufferCount()- Specified by:
nioBufferCountin classio.netty.buffer.ByteBuf
-
internalNioBuffer
- Specified by:
internalNioBufferin classio.netty.buffer.ByteBuf
-
nioBuffers
- Overrides:
nioBuffersin classio.netty.buffer.AbstractByteBuf
-
nioBuffers
- Specified by:
nioBuffersin classio.netty.buffer.ByteBuf
-
nioBuffer
- Overrides:
nioBufferin classio.netty.buffer.AbstractByteBuf
-
nioBuffer
Returns a buffer that is zero positioned but points to a slice of the original buffer starting at given index.- Specified by:
nioBufferin classio.netty.buffer.ByteBuf
-
nioBuffer
Returns a buffer that is zero positioned but points to a slice of the original buffer starting at given index. -
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
getBytes
public io.netty.buffer.ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) - Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
setBytes
public io.netty.buffer.ByteBuf setBytes(int index, byte[] src, int srcIndex, int length) - Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
getBytes
public io.netty.buffer.ByteBuf getBytes(int index, io.netty.buffer.ByteBuf dst, int dstIndex, int length) - Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
setBytes
public io.netty.buffer.ByteBuf setBytes(int index, io.netty.buffer.ByteBuf src, int srcIndex, int length) - Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
order
- Specified by:
orderin classio.netty.buffer.ByteBuf
-
order
- Overrides:
orderin classio.netty.buffer.AbstractByteBuf
-
_getUnsignedMedium
protected int _getUnsignedMedium(int index) - Specified by:
_getUnsignedMediumin classio.netty.buffer.AbstractByteBuf
-
_getUnsignedMediumLE
protected int _getUnsignedMediumLE(int index) - Specified by:
_getUnsignedMediumLEin classio.netty.buffer.AbstractByteBuf
-
_getByte
protected byte _getByte(int index) - Specified by:
_getBytein classio.netty.buffer.AbstractByteBuf
-
getByte
public byte getByte(int index) - Overrides:
getBytein classio.netty.buffer.AbstractByteBuf
-
_getShortLE
protected short _getShortLE(int index) - Specified by:
_getShortLEin classio.netty.buffer.AbstractByteBuf
-
_getShort
protected short _getShort(int index) - Specified by:
_getShortin classio.netty.buffer.AbstractByteBuf
-
getShort
public short getShort(int index) - Overrides:
getShortin classio.netty.buffer.AbstractByteBuf
-
_getIntLE
protected int _getIntLE(int index) - Specified by:
_getIntLEin classio.netty.buffer.AbstractByteBuf
-
_getInt
protected int _getInt(int index) - Specified by:
_getIntin classio.netty.buffer.AbstractByteBuf
-
getInt
public int getInt(int index) - Overrides:
getIntin classio.netty.buffer.AbstractByteBuf
-
_getLongLE
protected long _getLongLE(int index) - Specified by:
_getLongLEin classio.netty.buffer.AbstractByteBuf
-
_getLong
protected long _getLong(int index) - Specified by:
_getLongin classio.netty.buffer.AbstractByteBuf
-
getLong
public long getLong(int index) - Overrides:
getLongin classio.netty.buffer.AbstractByteBuf
-
_setByte
protected void _setByte(int index, int value) - Specified by:
_setBytein classio.netty.buffer.AbstractByteBuf
-
setByte
- Overrides:
setBytein classio.netty.buffer.AbstractByteBuf
-
_setShortLE
protected void _setShortLE(int index, int value) - Specified by:
_setShortLEin classio.netty.buffer.AbstractByteBuf
-
_setShort
protected void _setShort(int index, int value) - Specified by:
_setShortin classio.netty.buffer.AbstractByteBuf
-
setShort
- Overrides:
setShortin classio.netty.buffer.AbstractByteBuf
-
_setMedium
protected void _setMedium(int index, int value) - Specified by:
_setMediumin classio.netty.buffer.AbstractByteBuf
-
_setMediumLE
protected void _setMediumLE(int index, int value) - Specified by:
_setMediumLEin classio.netty.buffer.AbstractByteBuf
-
setMedium
- Overrides:
setMediumin classio.netty.buffer.AbstractByteBuf
-
_setInt
protected void _setInt(int index, int value) - Specified by:
_setIntin classio.netty.buffer.AbstractByteBuf
-
_setIntLE
protected void _setIntLE(int index, int value) - Specified by:
_setIntLEin classio.netty.buffer.AbstractByteBuf
-
setInt
- Overrides:
setIntin classio.netty.buffer.AbstractByteBuf
-
_setLong
protected void _setLong(int index, long value) - Specified by:
_setLongin classio.netty.buffer.AbstractByteBuf
-
_setLongLE
public void _setLongLE(int index, long value) - Specified by:
_setLongLEin classio.netty.buffer.AbstractByteBuf
-
setLong
- Overrides:
setLongin classio.netty.buffer.AbstractByteBuf
-
unwrapBuffer
unwrap arrow buffer into a netty buffer.
-
NettyArrowBuf(ArrowBuf, BufferAllocator, long)instead.