|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.dictionary.DictionaryHeader
public class DictionaryHeader
A class that contains the header information for a dictionary.
| Field Summary | |
|---|---|
protected static int |
BAD_MAGIC
|
protected int |
entryInfoOffsetsBytes
The number of bytes used to encode the offsets for the term information. |
protected long |
entryInfoOffsetsPos
The position of the entry info offsets buffer. |
protected int |
entryInfoOffsetsSize
The size of the entry info offsets buffer. |
protected long |
entryInfoPos
The position of the entry info buffer. |
protected int |
entryInfoSize
The size of the entry info buffer. |
protected static int |
GOOD_MAGIC
Good magic. |
protected int |
idToPosnBytes
The number of bytes that each ID to posn map entry requires. |
protected long |
idToPosnPos
The offset of the ID to position map in the file. |
protected int |
idToPosnSize
The size of the map from ID to position in the dictionary. |
protected int |
magic
A magic number, written last. |
protected int |
maxEntryID
The maximum ID assigned to an entry, which may be different than the size. |
protected int |
nameOffsetsBytes
The number of bytes used to encode the offsets for the uncompressed names. |
protected long |
nameOffsetsPos
The position of the names offset buffer. |
protected int |
nameOffsetsSize
The size of the names offset buffer. |
protected long |
namesPos
The position of the names buffer. |
protected int |
namesSize
The size of the names buffer. |
protected int |
nOffsets
The number of name offsets. |
protected long[] |
postEnd
The ending offsets for postings associated with this dictionary. |
protected long[] |
postStart
The starting offsets for postings associated with this dictionary. |
protected int |
size
The number of entries in the dictionary. |
| Constructor Summary | |
|---|---|
DictionaryHeader(int n)
Creates an empty header, suitable for filling during dumping. |
|
DictionaryHeader(java.io.RandomAccessFile dictFile)
Creates a dictionary header by reading it from the provided channel. |
|
| Method Summary | |
|---|---|
protected void |
computeValues()
Computes derived values. |
int |
getMaxID()
Gets the maximum ID in the dictionary. |
void |
goodMagic()
Tells the header that the magic is good. |
void |
read(java.io.RandomAccessFile dictFile)
Reads a dictionary header from the given channel. |
java.lang.String |
toString()
|
void |
write(java.io.RandomAccessFile dictFile)
Writes a dictionary header to the given channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int magic
protected int size
protected int maxEntryID
protected long idToPosnPos
protected int idToPosnSize
protected int idToPosnBytes
protected long nameOffsetsPos
protected int nameOffsetsSize
protected int nameOffsetsBytes
protected long namesPos
protected int namesSize
protected int nOffsets
protected long entryInfoOffsetsPos
protected int entryInfoOffsetsSize
protected int entryInfoOffsetsBytes
protected long entryInfoPos
protected int entryInfoSize
protected long[] postStart
protected long[] postEnd
protected static final int GOOD_MAGIC
protected static final int BAD_MAGIC
| Constructor Detail |
|---|
public DictionaryHeader(int n)
n - The number of postings channels associated with the
dictionary for which this is a header.
public DictionaryHeader(java.io.RandomAccessFile dictFile)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
protected void computeValues()
public void goodMagic()
public void read(java.io.RandomAccessFile dictFile)
throws java.io.IOException
java.io.IOException
public void write(java.io.RandomAccessFile dictFile)
throws java.io.IOException
java.io.IOExceptionpublic int getMaxID()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||