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(int id) |
int |
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(TempDictionarySection other,
ProgressListener listener)
Load entries from another dictionary section.
|
int |
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)
DictionarySectionPrivate
load
in interface DictionarySectionPrivate
public void load(Iterator<CharSequence> it, long numentries, ProgressListener listener)
protected int locateBlock(CharSequence str)
public int locate(CharSequence str)
locate
in interface DictionarySection
public int locateInBlock(int block, CharSequence str)
public CharSequence extract(int id)
extract
in interface DictionarySection
public long size()
size
in interface DictionarySection
public int getNumberOfElements()
getNumberOfElements
in interface DictionarySection
public Iterator<CharSequence> getSortedEntries()
getSortedEntries
in interface DictionarySection
public void save(OutputStream output, ProgressListener listener) throws IOException
DictionarySectionPrivate
save
in interface DictionarySectionPrivate
IOException
public void load(InputStream input, ProgressListener listener) throws IOException
DictionarySectionPrivate
load
in interface DictionarySectionPrivate
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017 INSIGHT Centre for Data Analytics. All rights reserved.