public abstract class IoUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
REUSABLE_BUFF_SIZE_MAX |
static int |
REUSABLE_BUFF_SIZE_MIN |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.channels.ReadableByteChannel |
getThreadLocalInputChannel(java.io.InputStream in,
long remainingSize)
Wraps the given input stream into the special stateless and reusable (thread local) byte
channel
|
static java.nio.channels.WritableByteChannel |
getThreadLocalOutputChannel(java.io.OutputStream out,
long remainingSize)
Wraps the given output stream into the special stateless and reusable (thread local) byte
channel
|
public static final int REUSABLE_BUFF_SIZE_MIN
public static final int REUSABLE_BUFF_SIZE_MAX
public static java.nio.channels.ReadableByteChannel getThreadLocalInputChannel(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 static java.nio.channels.WritableByteChannel getThreadLocalOutputChannel(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 specified