public class MemoryLinkedOutputStream extends OutputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
The default size of the internal buffer in bytes
|
protected MemoryLinkedOutputStream |
next
Reference to the linked structure
|
| Constructor and Description |
|---|
MemoryLinkedOutputStream()
Instanciates a MemoryLinkedOutputStream with the buffer size set to
DEFAULT_BUFFER_SIZE
|
MemoryLinkedOutputStream(int bufferSize)
Instanciates a MemoryLinkedOutputStream specifying the buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginRead()
Sets the structure for reading
|
void |
flush()
Empty method
|
byte[] |
getBuffer() |
MemoryLinkedOutputStream |
getNext() |
int |
getPos() |
boolean |
isNext() |
void |
nextBuffer()
Moves the pointer to the next buffer (reading)
|
void |
write(int b)
Writes a byte into the current buffer.
|
close, write, writepublic static final int DEFAULT_BUFFER_SIZE
protected MemoryLinkedOutputStream next
public MemoryLinkedOutputStream()
public MemoryLinkedOutputStream(int bufferSize)
bufferSize - int size of the first bufferpublic MemoryLinkedOutputStream getNext()
public int getPos()
public void beginRead()
public void write(int b)
throws IOException
write in class OutputStreamb - the byte to writeIOException - if an I/O error occurs.public byte[] getBuffer()
public boolean isNext()
public void nextBuffer()
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow