Class AbstractSeekableLineReader
java.lang.Object
org.archive.util.binsearch.AbstractSeekableLineReader
- All Implemented Interfaces:
SeekableLineReader
- Direct Known Subclasses:
HDFSSeekableLineReader,HTTPSeekableLineReader,MappedSeekableLineReader,NIOSeekableLineReader,RandomAccessFileSeekableLineReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected BufferedReaderprotected booleanprotected booleanprotected InputStreamstatic final Charset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()protected abstract voiddoClose()protected abstract InputStreamdoSeekLoad(long offset, int maxLength) voidfinalize()longgetSize()booleanisClosed()readLine()voidseek(long offset) voidseekWithMaxRead(long offset, boolean gzip, int maxLength) voidsetBufferFully(boolean fully) voidskipLine()
-
Field Details
-
UTF8
-
blockSize
protected int blockSize -
closed
protected boolean closed -
bufferFully
protected boolean bufferFully -
br
-
is
-
-
Constructor Details
-
AbstractSeekableLineReader
public AbstractSeekableLineReader() -
AbstractSeekableLineReader
public AbstractSeekableLineReader(int blockSize)
-
-
Method Details
-
seek
- Specified by:
seekin interfaceSeekableLineReader- Throws:
IOException
-
seekWithMaxRead
- Specified by:
seekWithMaxReadin interfaceSeekableLineReader- Throws:
IOException
-
doSeekLoad
- Throws:
IOException
-
doClose
- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin interfaceSeekableLineReader
-
skipLine
- Specified by:
skipLinein interfaceSeekableLineReader- Throws:
IOException
-
readLine
- Specified by:
readLinein interfaceSeekableLineReader- Throws:
IOException
-
close
- Specified by:
closein interfaceSeekableLineReader- Throws:
IOException
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceSeekableLineReader
-
getSize
- Specified by:
getSizein interfaceSeekableLineReader- Throws:
IOException
-
setBufferFully
public void setBufferFully(boolean fully) - Specified by:
setBufferFullyin interfaceSeekableLineReader
-
finalize
-