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, writepublic 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 OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException - Signals that an I/O exception has occurred.currentBuffer,
IBufferHandler.handleBuffer(IBuffer)public void flushWithEOS()
throws IOException
IOExceptionpublic void flushWithEOS(boolean ccam)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionprotected void ensureBuffer()
throws IOException
IOException - Signals that an I/O exception has occurred.flush(),
IBufferProvider.provideBuffer()protected boolean isPropagateClose()
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html