| Modifier and Type | Class and Description |
|---|---|
static class |
SortedTextFile.CachedStringIterator |
static class |
SortedTextFile.DefaultComparator |
static class |
SortedTextFile.NumericComparator |
| Modifier and Type | Field and Description |
|---|---|
protected int |
binsearchBlockSize |
static Comparator<String> |
defaultComparator |
protected SeekableLineReaderFactory |
factory |
static Comparator<String> |
numericComparator |
| Modifier | Constructor and Description |
|---|---|
protected |
SortedTextFile() |
|
SortedTextFile(SeekableLineReaderFactory factory) |
|
SortedTextFile(String filename) |
|
SortedTextFile(String filename,
boolean useNio) |
| Modifier and Type | Method and Description |
|---|---|
long |
binaryFindOffset(SeekableLineReader slr,
String key,
Comparator<String> comparator) |
int |
getBinsearchBlockSize() |
String |
getLastLine(SeekableLineReader slr) |
String[] |
getNthSplit(String start,
String end,
int split,
int numSplits) |
String[] |
getRange(String start,
String end) |
CloseableIterator<String> |
getRecordIterator(long offset) |
CloseableIterator<String> |
getRecordIterator(String prefix) |
CloseableIterator<String> |
getRecordIterator(String prefix,
boolean lessThan) |
CloseableIterator<String> |
getRecordIteratorLT(String prefix) |
SeekableLineReader |
getSLR() |
CloseableIterator<String> |
getSplitIterator(String start,
String end,
int numSplits) |
long[] |
getStartEndOffsets(SeekableLineReader slr,
String start,
String end) |
void |
reloadFactory() |
void |
setBinsearchBlockSize(int binsearchBlockSize) |
protected void |
setFactory(SeekableLineReaderFactory factory) |
public static final Comparator<String> numericComparator
public static final Comparator<String> defaultComparator
protected SeekableLineReaderFactory factory
protected int binsearchBlockSize
public SortedTextFile(SeekableLineReaderFactory factory)
public SortedTextFile(String filename) throws IOException
IOExceptionpublic SortedTextFile(String filename, boolean useNio) throws IOException
IOExceptionprotected SortedTextFile()
protected void setFactory(SeekableLineReaderFactory factory)
public void reloadFactory()
public int getBinsearchBlockSize()
public void setBinsearchBlockSize(int binsearchBlockSize)
public CloseableIterator<String> getRecordIteratorLT(String prefix) throws IOException
IOExceptionpublic CloseableIterator<String> getRecordIterator(String prefix) throws IOException
IOExceptionpublic SeekableLineReader getSLR() throws IOException
IOExceptionpublic CloseableIterator<String> getRecordIterator(long offset) throws IOException
IOExceptionpublic CloseableIterator<String> getRecordIterator(String prefix, boolean lessThan) throws IOException
IOExceptionpublic long binaryFindOffset(SeekableLineReader slr, String key, Comparator<String> comparator) throws IOException
IOExceptionpublic long[] getStartEndOffsets(SeekableLineReader slr, String start, String end) throws IOException
IOExceptionpublic CloseableIterator<String> getSplitIterator(String start, String end, int numSplits) throws IOException
IOExceptionpublic String[] getRange(String start, String end) throws IOException
IOExceptionpublic String[] getNthSplit(String start, String end, int split, int numSplits) throws IOException
IOExceptionpublic String getLastLine(SeekableLineReader slr) throws IOException
IOExceptionCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.