ByteBuffer to CharBuffer
pavel.rappo at oracle.com
Mon Feb 6 11:24:17 UTC 2017
1. I don't know if you've forgotten to attach the patch you mentioned or it has
been stripped by the mail list. In any case, if it's not too big, please inline
it in your next email.
2. A more appropriate place for this discussion would be another list:
nio-dev at openjdk dot java dot net
> On 6 Feb 2017, at 10:57, Jay <jay.sridhar at gmail.com> wrote:
> java.nio.ByteBuffer provides a method asCharBuffer() which returns a
> "view" of the ByteBuffer as a character buffer. It however does not
> take any arguments. And there is no mention in the Javadocs as to how
> it converts from bytes to chars.
> 1. There should be a method ByteBuffer.asCharBuffer(CharSet) and/or
> ByteBuffer.asCharBuffer(String charSet) which allows the user to
> explicitly specify the character set to be used for conversion.
> 2. The method ByteBuffer.asCharBuffer() should mention that this
> method uses the platform default charset for bytes-to-chars
> I can provide a patch with these two changes. What do you guys think?
More information about the core-libs-dev