|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.galagosearch.core.index.CompressedByteBuffer
public class CompressedByteBuffer
Stores lists of integers in vbyte compressed form. This is useful for buffering data that will be stored compressed on disk.
| Constructor Summary | |
|---|---|
CompressedByteBuffer()
|
|
| Method Summary | |
|---|---|
void |
add(CompressedByteBuffer other)
Copies the entire contents of another compressed buffer to the end of this one. |
void |
add(long i)
Adds a single number to the buffer. |
void |
addFloat(float value)
Adds a floating point value, (4 bytes) to the buffer. |
void |
addRaw(int value)
Add a single byte to the buffer. |
void |
clear()
Erases the contents of this buffer and sets its length to zero. |
byte[] |
getBytes()
Returns a byte array containing the contents of this buffer. |
int |
length()
Returns the length of the data stored in this buffer. |
void |
write(java.io.OutputStream stream)
Writes the contents of this buffer to a stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompressedByteBuffer()
| Method Detail |
|---|
public void addRaw(int value)
value - The byte value to add.public void add(long i)
public void addFloat(float value)
public void add(CompressedByteBuffer other)
other - The buffer to copy.public void clear()
public byte[] getBytes()
public int length()
public void write(java.io.OutputStream stream)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||