4.66. kink/javahost/JAVA_CHANNEL_OUTPUT

4.66.1. JAVA_CHANNEL_OUTPUT.new(Channel ...[$config={}])

`new` makes an output which wraps WritableByteChannel.

See kink/io/OUTPUT for `output` type.

Preconditions

• `Channel` must be an instance of java.nio.channels.WritableByteChannel.

• $config must be a fun which takes a config val.

Config val

The config val has the following method.

• C.buffer(...[Buf_size]): specifies that the result output does buffering. `Buf_size`, if given, must be a positive int num, and used as the number of bytes of the output buffer. If `Buf_size` is not given, a default buffer size is used. If `buffer` is not called, the result input does not do buffering.

• C.close_method_name(Close_method_name='close'): specifies the name of the Java method of the channel when `Out.close` is called. The method must not take any argument, and throws an IOException when something wrong happens. For example, you can call `C.close_method_name('shutdownOutput')` for SocketChannel.