public class FileBasedRandomInputView extends AbstractPagedInputView implements SeekableDataInputView, Closeable
SeekableDataInputView to read bytes from RandomAccessFile, the bytes can be
cached to MemorySegments in CacheManager.| Constructor and Description |
|---|
FileBasedRandomInputView(PageFileInput input,
CacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected int |
getLimitForSegment(MemorySegment segment)
Gets the limit for reading bytes from the given memory segment.
|
protected MemorySegment |
nextSegment(MemorySegment current)
The method by which concrete subclasses realize page crossing.
|
void |
setReadPosition(long position)
Sets the read pointer to the given position.
|
advance, clear, doAdvance, getCurrentPositionInSegment, getCurrentSegment, getCurrentSegmentLimit, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seekInput, skipBytes, skipBytesToReadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitread, read, skipBytesToReadreadBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytespublic FileBasedRandomInputView(PageFileInput input, CacheManager cacheManager)
public void setReadPosition(long position)
SeekableDataInputViewsetReadPosition in interface SeekableDataInputViewposition - The new read position.protected MemorySegment nextSegment(MemorySegment current) throws EOFException
AbstractPagedInputViewEOFException.nextSegment in class AbstractPagedInputViewcurrent - The current page that was read to its limit. May be null, if this
method is invoked for the first time.null. If the
input is exhausted, an EOFException must be thrown instead.EOFException - Thrown, if no further segment is available.protected int getLimitForSegment(MemorySegment segment)
AbstractPagedInputViewgetLimitForSegment in class AbstractPagedInputViewsegment - The segment to determine the limit for.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2023–2025 The Apache Software Foundation. All rights reserved.