|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.dictionary.FieldStoreHeader
public class FieldStoreHeader
Field Summary | |
---|---|
protected java.nio.ByteBuffer |
bb
The byte buffer underlying our buffer of longs. |
protected java.nio.LongBuffer |
lb
A buffer to hold the offsets of the dictionaries for the fields. |
protected int |
nFields
The number of field offsets that we're storing. |
Constructor Summary | |
---|---|
FieldStoreHeader(java.nio.channels.FileChannel c)
Creates a header for the given number of fields by reading it from the given channel. |
|
FieldStoreHeader(int nFields)
Creates a header for the given number of fields. |
Method Summary | |
---|---|
void |
addOffset(int f,
long offset)
Adds a dictionary offset for a given field. |
long |
getOffset(int f)
Gets an offset for a given field. |
void |
read(java.nio.channels.FileChannel c)
Reads the header from the given channel |
java.lang.String |
toString()
|
void |
write(java.nio.channels.FileChannel c)
Writes the 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 nFields
protected java.nio.LongBuffer lb
protected java.nio.ByteBuffer bb
Constructor Detail |
---|
public FieldStoreHeader(int nFields)
public FieldStoreHeader(java.nio.channels.FileChannel c) throws java.io.IOException
c
- The channel from which to read the header.
java.io.IOException
- if there is any error reading the
header.Method Detail |
---|
public void addOffset(int f, long offset)
f
- The ID of the field whose offset we want to add.offset
- The offset of the field dictionary.public long getOffset(int f)
f
- The ID of the field whose offset we want to get.public void write(java.nio.channels.FileChannel c) throws java.io.IOException
c
- The channel to which we will write the header.
java.io.IOException
- if there is any error writing the data.public void read(java.nio.channels.FileChannel c) throws java.io.IOException
c
- The channel from which to read the header.
java.io.IOException
- if there is any error reading the
header.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 |