public class SynchronousBufferFileReader extends SynchronousFileIOChannel implements BufferFileReader
BufferFileReader
implementation.
This currently bypasses the I/O manager as it is the only synchronous implementation, which is currently in use. TODO Refactor I/O manager setup and refactor this into it
FileIOChannel.Enumerator, FileIOChannel.ID
fileChannel, id, LOG
Constructor and Description |
---|
SynchronousBufferFileReader(FileIOChannel.ID channelID,
boolean writeEnabled) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasReachedEndOfFile() |
void |
readInto(Buffer buffer) |
void |
seekToPosition(long position) |
close, isClosed
closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize, isClosed
public SynchronousBufferFileReader(FileIOChannel.ID channelID, boolean writeEnabled) throws IOException
IOException
public void readInto(Buffer buffer) throws IOException
readInto
in interface BufferFileReader
IOException
public void seekToPosition(long position) throws IOException
seekToPosition
in interface BufferFileReader
IOException
public boolean hasReachedEndOfFile()
hasReachedEndOfFile
in interface BufferFileReader
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.