public class InputStreamWrapperChannel extends BufferedByteChannelBase implements BufferedReadableByteChannel
bb, buffer, REUSABLE_BUFF_SIZE_MAX, REUSABLE_BUFF_SIZE_MIN| Constructor and Description |
|---|
InputStreamWrapperChannel(java.io.InputStream in,
int buffSize) |
| Modifier and Type | Method and Description |
|---|---|
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, close, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbufferpublic InputStreamWrapperChannel(java.io.InputStream in,
int buffSize)
public 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 specified