4.65. kink/javahost/JAVA_CHANNEL_INPUT¶
4.65.1. JAVA_CHANNEL_INPUT.new(Channel ...[$config={}])¶
`new` makes an `input` from ReadableByteChannel.
See kink/io/INPUT for `input` type.
Preconditions
• `Channel` must be an instance of java.nio.channels.ReadableByteChannel.
• $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 input does buffering. `Buf_size`, if given, must be a positive int num, and used as the number of bytes of the input 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 `In.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('shutdownInput')` for SocketChannel.