Class NIOSeekableLineReaderFactory
java.lang.Object
org.archive.util.binsearch.impl.NIOSeekableLineReaderFactory
- All Implemented Interfaces:
SeekableLineReaderFactory
A SeekableLineReaderFactory that opens a file ONCE at construction.
Should be able to re-use the same FileChannel across threads, and might be
more efficient than the RandomAccessFileSeekableLineReaderXXX classes.
- Author:
- brad
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.archive.util.binsearch.SeekableLineReaderFactory
BINSEARCH_BLOCK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNIOSeekableLineReaderFactory(File file, int blockSize) NIOSeekableLineReaderFactory(File file, int blockSize, NIOSeekableLineReaderFactory.NIOType type) -
Method Summary
-
Constructor Details
-
NIOSeekableLineReaderFactory
public NIOSeekableLineReaderFactory(File file, int blockSize, NIOSeekableLineReaderFactory.NIOType type) throws IOException - Throws:
IOException
-
NIOSeekableLineReaderFactory
- Throws:
IOException
-
NIOSeekableLineReaderFactory
- Throws:
IOException
-
-
Method Details
-
get
- Specified by:
getin interfaceSeekableLineReaderFactory- Throws:
IOException
-
close
- Specified by:
closein interfaceSeekableLineReaderFactory- Throws:
IOException
-
getModTime
public long getModTime()- Specified by:
getModTimein interfaceSeekableLineReaderFactory
-
reload
- Specified by:
reloadin interfaceSeekableLineReaderFactory- Throws:
IOException
-