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