public class RandomAccessInputView extends AbstractPagedInputView implements SeekableDataInputView
AbstractPagedInputView to read pages in memory.| 构造器和说明 |
|---|
RandomAccessInputView(ArrayList<MemorySegment> segments,
int segmentSize) |
RandomAccessInputView(ArrayList<MemorySegment> segments,
int segmentSize,
int limitInLastSegment) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
getLimitForSegment(MemorySegment segment)
Gets the limit for reading bytes from the given memory segment.
|
long |
getReadPosition() |
protected MemorySegment |
nextSegment(MemorySegment current)
The method by which concrete subclasses realize page crossing.
|
List<MemorySegment> |
segments() |
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 RandomAccessInputView(ArrayList<MemorySegment> segments, int segmentSize)
public RandomAccessInputView(ArrayList<MemorySegment> segments, int segmentSize, int limitInLastSegment)
public void setReadPosition(long position)
SeekableDataInputViewsetReadPosition 在接口中 SeekableDataInputViewposition - The new read position.public long getReadPosition()
protected MemorySegment nextSegment(MemorySegment current) throws EOFException
AbstractPagedInputViewEOFException.nextSegment 在类中 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 在类中 AbstractPagedInputViewsegment - The segment to determine the limit for.public List<MemorySegment> segments()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.