|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.compression.LinkedBuffer
public class LinkedBuffer
Implements an element of a linked list that contains a byte array
Field Summary | |
---|---|
static int |
DEFAULT_BUFFER_SIZE
The default size of the internal buffer in bytes The buffer has to be big enough to allocate a single write, i.e we cannot write *at once* more than bufferSize bytes |
Constructor Summary | |
---|---|
LinkedBuffer()
Default Constructor. |
|
LinkedBuffer(int bufferSize)
Constructor |
Method Summary | |
---|---|
byte[] |
getBuffer()
|
int |
getBufferSize()
|
LinkedBuffer |
getNext()
|
int |
getPosition()
|
void |
setNext(LinkedBuffer next)
Set the next buffer in the list |
boolean |
write(int b)
Writes a byte in the buffer |
boolean |
writeByte(byte b)
Writes a byte in the buffer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
---|
public LinkedBuffer()
public LinkedBuffer(int bufferSize)
bufferSize
- size in bytes of the buffer.Method Detail |
---|
public LinkedBuffer getNext()
public void setNext(LinkedBuffer next)
next
- next LinkedBuffer in the listpublic boolean write(int b) throws java.io.IOException
b
- int containing the byte to write
java.io.IOException
public boolean writeByte(byte b) throws java.io.IOException
b
- byte to write
java.io.IOException
public int getBufferSize()
public int getPosition()
public byte[] getBuffer()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |