public class BufferOutputStream extends OutputStream
output stream
that fragments the written byte sequence into fixed-sized buffers
and passes them to configured buffer handler
.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_PROPAGATE_CLOSE |
Constructor and Description |
---|
BufferOutputStream(IBufferHandler bufferHandler,
IBufferProvider bufferProvider,
short channelID) |
BufferOutputStream(IBufferHandler bufferHandler,
short channelID) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
ensureBuffer()
Ensures that this BufferOutputStream has a buffer.
|
void |
flush()
Flushes the current buffer, it's handled over to the buffer handler.
|
void |
flushWithEOS() |
void |
flushWithEOS(boolean ccam) |
Throwable |
getError() |
protected boolean |
isPropagateClose() |
void |
setError(Throwable error) |
String |
toString() |
void |
write(int b) |
write, write
public static final boolean DEFAULT_PROPAGATE_CLOSE
public BufferOutputStream(IBufferHandler bufferHandler, IBufferProvider bufferProvider, short channelID)
public BufferOutputStream(IBufferHandler bufferHandler, short channelID)
public Throwable getError()
public void setError(Throwable error)
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
- Signals that an I/O exception has occurred.currentBuffer
,
IBufferHandler.handleBuffer(IBuffer)
public void flushWithEOS() throws IOException
IOException
public void flushWithEOS(boolean ccam) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
protected void ensureBuffer() throws IOException
IOException
- Signals that an I/O exception has occurred.flush()
,
IBufferProvider.provideBuffer()
protected boolean isPropagateClose()
Copyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.