public class BufferOutputStream
extends java.io.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) |
java.lang.Throwable |
getError() |
protected boolean |
isPropagateClose() |
void |
setError(java.lang.Throwable error) |
java.lang.String |
toString() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public static final boolean DEFAULT_PROPAGATE_CLOSE
public BufferOutputStream(IBufferHandler bufferHandler, IBufferProvider bufferProvider, short channelID)
public BufferOutputStream(IBufferHandler bufferHandler, short channelID)
public java.lang.Throwable getError()
public void setError(java.lang.Throwable error)
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- Signals that an I/O exception has occurred.currentBuffer
,
IBufferHandler.handleBuffer(IBuffer)
public void flushWithEOS() throws java.io.IOException
java.io.IOException
public void flushWithEOS(boolean ccam) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
protected void ensureBuffer() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.flush()
,
IBufferProvider.provideBuffer()
protected boolean isPropagateClose()
Copyright (c) 2004-2019 Eike Stepper (Loehne, 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