public class PFCDictionarySection extends Object implements DictionarySectionPrivate
| Modifier and Type | Field and Description |
|---|---|
protected SequenceLog64 |
blocks |
protected int |
blocksize |
static int |
DEFAULT_BLOCK_SIZE |
protected int |
numstrings |
protected byte[] |
text |
static int |
TYPE_INDEX |
| Constructor and Description |
|---|
PFCDictionarySection(HDTOptions spec) |
| 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(Iterator<CharSequence> it,
long numentries,
ProgressListener listener) |
void |
load(PFCDictionarySectionBuilder builder) |
void |
load(TempDictionarySection other,
ProgressListener listener)
Load entries from another dictionary section.
|
long |
locate(CharSequence str) |
protected int |
locateBlock(CharSequence str) |
int |
locateInBlock(int 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 byte[] text
protected int blocksize
protected int numstrings
protected SequenceLog64 blocks
public PFCDictionarySection(HDTOptions spec)
public void load(TempDictionarySection other, ProgressListener listener)
DictionarySectionPrivateload in interface DictionarySectionPrivatepublic void load(PFCDictionarySectionBuilder builder) throws IOException
IOExceptionpublic void load(Iterator<CharSequence> it, long numentries, ProgressListener listener)
protected int locateBlock(CharSequence str)
public long locate(CharSequence str)
locate in interface DictionarySectionpublic int locateInBlock(int 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 save(OutputStream output, ProgressListener listener) throws IOException
DictionarySectionPrivatesave in interface DictionarySectionPrivateIOExceptionpublic void load(InputStream input, ProgressListener listener) throws IOException
DictionarySectionPrivateload in interface DictionarySectionPrivateIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2018 DataWeb Research. All rights reserved.