-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
9
-
None
Consider adding the following functionality to java.nio.charset.CharsetDecoder:
CharsetDecoder#decode(ByteBuffer[] in, CharBuffer out, boolean endOfInput)
What we already have is this:
CharsetDecoder#decode(ByteBuffer in, CharBuffer out, boolean endOfInput)
The rationale behind the proposed method is to facilitate a scenario where an input sequence of bytes is spread across several byte buffers. Typically such sequences originate from consecutive reads or a single gathering read from a channel.
Currently in such cases additional rearrangement of buffers is required. Which leads to a copy-pasted and error-prone code in sources and additional allocation and copying at runtime.
------------------
(originated from http://mail.openjdk.java.net/pipermail/nio-dev/2016-March/003588.html)
CharsetDecoder#decode(ByteBuffer[] in, CharBuffer out, boolean endOfInput)
What we already have is this:
CharsetDecoder#decode(ByteBuffer in, CharBuffer out, boolean endOfInput)
The rationale behind the proposed method is to facilitate a scenario where an input sequence of bytes is spread across several byte buffers. Typically such sequences originate from consecutive reads or a single gathering read from a channel.
Currently in such cases additional rearrangement of buffers is required. Which leads to a copy-pasted and error-prone code in sources and additional allocation and copying at runtime.
------------------
(originated from http://mail.openjdk.java.net/pipermail/nio-dev/2016-March/003588.html)