Package io.trino.orc.stream
Class AbstractDiskOrcDataReader
- java.lang.Object
-
- io.trino.orc.stream.AbstractDiskOrcDataReader
-
- All Implemented Interfaces:
OrcDataReader
public abstract class AbstractDiskOrcDataReader extends Object implements OrcDataReader
-
-
Constructor Summary
Constructors Constructor Description AbstractDiskOrcDataReader(OrcDataSourceId orcDataSourceId, int dataSize, int bufferSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetMaxBufferSize()Maximum size of the buffer returned fromOrcDataReader.seekBuffer(int).OrcDataSourceIdgetOrcDataSourceId()longgetRetainedSize()Gets the memory size of this instance.intgetSize()Total size of the data that can be accessed withOrcDataReader.seekBuffer(int).abstract voidread(long position, byte[] buffer, int bufferOffset, int length)io.airlift.slice.SliceseekBuffer(int newPosition)Returns a buffer of the data starting at the specified position.StringtoString()
-
-
-
Constructor Detail
-
AbstractDiskOrcDataReader
public AbstractDiskOrcDataReader(OrcDataSourceId orcDataSourceId, int dataSize, int bufferSize)
-
-
Method Detail
-
getOrcDataSourceId
public final OrcDataSourceId getOrcDataSourceId()
- Specified by:
getOrcDataSourceIdin interfaceOrcDataReader
-
getRetainedSize
public long getRetainedSize()
Description copied from interface:OrcDataReaderGets the memory size of this instance.- Specified by:
getRetainedSizein interfaceOrcDataReader
-
getSize
public final int getSize()
Description copied from interface:OrcDataReaderTotal size of the data that can be accessed withOrcDataReader.seekBuffer(int).- Specified by:
getSizein interfaceOrcDataReader
-
getMaxBufferSize
public final int getMaxBufferSize()
Description copied from interface:OrcDataReaderMaximum size of the buffer returned fromOrcDataReader.seekBuffer(int).- Specified by:
getMaxBufferSizein interfaceOrcDataReader
-
seekBuffer
public final io.airlift.slice.Slice seekBuffer(int newPosition) throws IOExceptionDescription copied from interface:OrcDataReaderReturns a buffer of the data starting at the specified position. This will return a buffer ofOrcDataReader.getMaxBufferSize(), unless near the end of the data.- Specified by:
seekBufferin interfaceOrcDataReader- Throws:
IOException
-
read
public abstract void read(long position, byte[] buffer, int bufferOffset, int length) throws IOException- Throws:
IOException
-
-