Method Summary |
|
public static ReadableByteChannel | newChannel(InputStream inputStream) Answers a channel on the given input stream
Parameters: inputStream - the stream to be wrapped in a byte channel. |
public static WritableByteChannel | newChannel(OutputStream outputStream) Answers a channel on the given output stream
Parameters: outputStream - the stream to be wrapped in a byte channel. |
public static InputStream | newInputStream(ReadableByteChannel channel) Answers an input stream on the given channel
Parameters: channel - The channel to be wrapped in an InputStream. |
public static OutputStream | newOutputStream(WritableByteChannel channel) Answers an output stream on the given channel
Parameters: channel - the channel to be wrapped in an OutputStream. |
public static Reader | newReader(ReadableByteChannel channel, CharsetDecoder decoder, int minBufferCapacity) Answers a reader that decodes bytes from a channel.
Parameters: channel - Channel to be read. Parameters: decoder - Charset decoder to be used. Parameters: minBufferCapacity - The minimum size of byte buffer, -1 means to use default size. |
public static Reader | newReader(ReadableByteChannel channel, String charsetName) Answers a reader that decodes bytes from a channel.
Parameters: channel - Channel to be read. Parameters: charsetName - Name of charset. |
public static Writer | newWriter(WritableByteChannel channel, CharsetEncoder encoder, int minBufferCapacity) Answers a writer that encodes characters by encoder and output bytes to a
channel.
Parameters: channel - Channel to be written. Parameters: encoder - Charset decoder to be used. Parameters: minBufferCapacity - The minimum size of byte buffer, -1 means to use default size. |
public static Writer | newWriter(WritableByteChannel channel, String charsetName) Answers a writer that encodes characters by encoder and output bytes to a
channel.
Parameters: channel - Channel to be written. Parameters: charsetName - Name of charset. |
static ByteBuffer | wrapByteBuffer(byte[] bytes, int offset, int length) |