A DESCRIPTION OF THE REQUEST :
To class String add:
public String(byte[] bytes, CharsetDecoder decoder);
public byte[] String.getBytes(CharsetEncoder encoder);
JUSTIFICATION :
Currently, the existing API for String de/encoding is only via Charset, or charset name. Internally always a lookup/instantiation of the concerning de/encoder is required. On de/encoding short strings this has a appreciable effect on it's performance. this could be avoided, if externally cached CharsetDe/Encoder object could be passed.
See discussion:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-May/006842.html
To class String add:
public String(byte[] bytes, CharsetDecoder decoder);
public byte[] String.getBytes(CharsetEncoder encoder);
JUSTIFICATION :
Currently, the existing API for String de/encoding is only via Charset, or charset name. Internally always a lookup/instantiation of the concerning de/encoder is required. On de/encoding short strings this has a appreciable effect on it's performance. this could be avoided, if externally cached CharsetDe/Encoder object could be passed.
See discussion:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-May/006842.html