public class OutputStreamWrapperChannel extends BufferedByteChannelBase implements BufferedWritableByteChannel
bb, buffer, REUSABLE_BUFF_SIZE_MAX, REUSABLE_BUFF_SIZE_MIN| Constructor and Description |
|---|
OutputStreamWrapperChannel(java.io.OutputStream out,
int buffSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BufferedWritableByteChannel |
getThreadLocalInstance(java.io.OutputStream out,
long remainingSize)
Wraps the given output stream into the special stateless and reusable (thread local) byte
channel
|
int |
write(java.nio.ByteBuffer src) |
buffer, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbufferpublic OutputStreamWrapperChannel(java.io.OutputStream out,
int buffSize)
public final int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic static BufferedWritableByteChannel getThreadLocalInstance(java.io.OutputStream out, long remainingSize) throws java.lang.IllegalStateException
out - the output stream to wrap into the byte channelremainingSize - the estimated size of the data to be written to the given outputjava.lang.IllegalStateException - if negative remaining size is specifiedpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOException