public class InputStreamWrapperChannel extends BufferedByteChannelBase implements BufferedReadableByteChannel
bb, buffer, REUSABLE_BUFF_SIZE_MAX, REUSABLE_BUFF_SIZE_MIN| Constructor and Description |
|---|
InputStreamWrapperChannel(int buffSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BufferedReadableByteChannel |
getThreadLocalInstance(java.io.InputStream in,
long remainingSize)
Wraps the given input stream into the special stateless and reusable (thread local) byte
channel
|
int |
read(java.nio.ByteBuffer dst) |
buffer, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbufferpublic final int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic static BufferedReadableByteChannel getThreadLocalInstance(java.io.InputStream in, long remainingSize) throws java.lang.IllegalStateException
in - the input stream to wrapremainingSize - the estimated size of the data to be read from the given inputjava.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