public abstract class AbstractSeekableLineReader extends Object implements SeekableLineReader
| Modifier and Type | Field and Description |
|---|---|
protected int |
blockSize |
protected BufferedReader |
br |
protected boolean |
bufferFully |
protected boolean |
closed |
protected InputStream |
is |
static Charset |
UTF8 |
| Constructor and Description |
|---|
AbstractSeekableLineReader() |
AbstractSeekableLineReader(int blockSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
doClose() |
protected abstract InputStream |
doSeekLoad(long offset,
int maxLength) |
void |
finalize() |
InputStream |
getInputStream() |
long |
getSize() |
boolean |
isClosed() |
String |
readLine() |
void |
seek(long offset) |
void |
seekWithMaxRead(long offset,
boolean gzip,
int maxLength) |
void |
setBufferFully(boolean fully) |
void |
skipLine() |
public static final Charset UTF8
protected int blockSize
protected boolean closed
protected boolean bufferFully
protected BufferedReader br
protected InputStream is
public AbstractSeekableLineReader()
public AbstractSeekableLineReader(int blockSize)
public void seek(long offset)
throws IOException
seek in interface SeekableLineReaderIOExceptionpublic void seekWithMaxRead(long offset,
boolean gzip,
int maxLength)
throws IOException
seekWithMaxRead in interface SeekableLineReaderIOExceptionprotected abstract InputStream doSeekLoad(long offset, int maxLength) throws IOException
IOExceptionprotected abstract void doClose()
throws IOException
IOExceptionpublic InputStream getInputStream()
getInputStream in interface SeekableLineReaderpublic void skipLine()
throws IOException
skipLine in interface SeekableLineReaderIOExceptionpublic String readLine() throws IOException
readLine in interface SeekableLineReaderIOExceptionpublic final void close()
throws IOException
close in interface SeekableLineReaderIOExceptionpublic boolean isClosed()
isClosed in interface SeekableLineReaderpublic long getSize()
throws IOException
getSize in interface SeekableLineReaderIOExceptionpublic void setBufferFully(boolean fully)
setBufferFully in interface SeekableLineReaderCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.