Fastpath for new String(bytes...) and String.getBytes(...)

Ulf Zibis Ulf.Zibis at
Fri Mar 20 23:28:33 UTC 2009

Am 21.03.2009 00:02, Xueming Shen schrieb:
> to be honest i'm not convinced that a base/abstract-X-coder has any 
> advantage compared to
> current interface approach, at least in this case,  can you explain 
> more? you will have to cast
> anyway in the StringCoding class until the those utility methods get 
> themself into the
> Charset-X-coder class.

1.) You are right, it's not as simple as I thought first, having 
Base/Abstract-X-coder. Maybe there is a Chance by generifying Charset 
and Charset-X-coder.

2.) To implement the 4-way x-codeLoop() methods for general use for all 
sun.nio.cs charsets sun.nio.cs.Base/Abstract-X-coder is the only way, so 
why introduce additional interface. There also constants like MAX_ASCII, 
MALFORMED_EXCEPTION, etc. could be hosted. See:


More information about the core-libs-dev mailing list