public class PFCDictionarySectionMap extends Object implements DictionarySectionPrivate, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Sequence |
blocks |
protected int |
blocksize |
protected ByteBuffer[] |
buffers |
protected FileChannel |
ch |
protected long |
dataSize |
static int |
DEFAULT_BLOCK_SIZE |
protected long |
numstrings |
static int |
TYPE_INDEX |
| Constructor and Description |
|---|
PFCDictionarySectionMap(CountInputStream input,
File f) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CharSequence |
extract(long id) |
long |
getNumberOfElements() |
Iterator<CharSequence> |
getSortedEntries() |
void |
load(InputStream input,
ProgressListener listener)
Load dictionary section from a stream.
|
void |
load(TempDictionarySection other,
ProgressListener listener)
Load entries from another dictionary section.
|
long |
locate(CharSequence str) |
int |
locateInBlock(long block,
CharSequence str) |
void |
save(OutputStream output,
ProgressListener listener)
Serialize dictionary section to a stream.
|
long |
size() |
public static final int TYPE_INDEX
public static final int DEFAULT_BLOCK_SIZE
protected FileChannel ch
protected ByteBuffer[] buffers
protected int blocksize
protected long numstrings
protected Sequence blocks
protected long dataSize
public PFCDictionarySectionMap(CountInputStream input, File f) throws IOException
IOExceptionpublic long locate(CharSequence str)
locate in interface DictionarySectionpublic int locateInBlock(long block,
CharSequence str)
public CharSequence extract(long id)
extract in interface DictionarySectionpublic long size()
size in interface DictionarySectionpublic long getNumberOfElements()
getNumberOfElements in interface DictionarySectionpublic Iterator<CharSequence> getSortedEntries()
getSortedEntries in interface DictionarySectionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void load(TempDictionarySection other, ProgressListener listener)
DictionarySectionPrivateload in interface DictionarySectionPrivatepublic void save(OutputStream output, ProgressListener listener) throws IOException
DictionarySectionPrivatesave in interface DictionarySectionPrivateIOExceptionpublic void load(InputStream input, ProgressListener listener) throws IOException
DictionarySectionPrivateload in interface DictionarySectionPrivateIOExceptionCopyright © 2018 DataWeb Research. All rights reserved.