public class FlatFile extends Object
| Constructor and Description |
|---|
FlatFile() |
FlatFile(File parent,
String child) |
FlatFile(String path) |
| Modifier and Type | Method and Description |
|---|---|
long |
findKeyOffset(RandomAccessFile fh,
String key)
Binary search thru RandomAccessFile argument to locate the first line
prefixed by key argument.
|
long |
findKeyOffsetLT(RandomAccessFile fh,
String key) |
long |
getLastMatchOffset() |
String |
getPath() |
org.archive.util.iterator.CloseableIterator<String> |
getRecordIterator(String prefix) |
org.archive.util.iterator.CloseableIterator<String> |
getRecordIteratorLT(String prefix) |
ReverseRecordIterator |
getReverseRecordIterator(String prefix) |
org.archive.util.iterator.CloseableIterator<String> |
getSequentialIterator() |
static void |
main(String[] args) |
void |
setPath(String path) |
void |
store(Iterator<String> itr) |
protected File file
public FlatFile()
public FlatFile(String path)
path - public void setPath(String path)
path - to setpublic String getPath()
public long findKeyOffset(RandomAccessFile fh, String key) throws IOException
fh - key - IOExceptionpublic long findKeyOffsetLT(RandomAccessFile fh, String key) throws IOException
IOExceptionpublic long getLastMatchOffset()
public org.archive.util.iterator.CloseableIterator<String> getSequentialIterator() throws IOException
IOExceptionpublic org.archive.util.iterator.CloseableIterator<String> getRecordIterator(String prefix) throws IOException
prefix - IOExceptionpublic org.archive.util.iterator.CloseableIterator<String> getRecordIteratorLT(String prefix) throws IOException
IOExceptionpublic ReverseRecordIterator getReverseRecordIterator(String prefix) throws IOException
prefix - IOExceptionpublic void store(Iterator<String> itr) throws IOException
IOExceptionpublic static void main(String[] args)
args - Copyright © 2005–2015 IIPC. All rights reserved.