BufferedByteChannel, BufferedWritableByteChannel, java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, java.nio.channels.WritableByteChannelpublic class OutputStreamWrapperChannel extends BufferedByteChannelBase implements BufferedWritableByteChannel
bb, buffer, REUSABLE_BUFF_SIZE_MAX, REUSABLE_BUFF_SIZE_MIN| Constructor | Description |
|---|---|
OutputStreamWrapperChannel(java.io.OutputStream out,
int buffSize) |
| Modifier and Type | Method | 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) |
bufferbuffer, isOpenpublic 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.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in interface java.io.Closeablejava.io.IOException