Lower overhead String encoding/decoding

Alan Bateman Alan.Bateman at oracle.com
Tue Oct 28 14:52:21 UTC 2014

On 26/10/2014 21:10, Richard Warburton wrote:
> :
> Thanks for taking the time to look at this - most appreciated. I've 
> pushed the latest iteration to 
> http://cr.openjdk.java.net/~rwarburton/string-patch-webrev-8/ 
> <http://cr.openjdk.java.net/%7Erwarburton/string-patch-webrev-8/>.
I think this is looking good.

For the constructor then the words "decoding the specified byte buffer", 
it might be a bit clearer as "decoding the remaining bytes in the ...".

For getBytes(ByteBuffer, Charset) then the position is advanced by the 
bytes written, no need to mention the number of chars read here.

In the constructor then you make it clear that malformed/unmappable 
sequences use the default replacement. This is important to state in the 
getBytes methods too because the encoding can fail.


More information about the core-libs-dev mailing list