Xueming Shen wrote:
I would be very hesitated to add methods with specific encoding names,
even these encodings are
VERY important, such as ASCII and ISO8859. Hack a fast path in the
implementation to boost the
performance for some important encodings is something we want to do, but
add specific methods
into the API is totally different thing.
In my opinion, it makes more sense to add methods to Charset than to
String - the latter is easily the more fundamental type. Indeed there
are already convenience methods encode/decode for ByteBuffer. Trusted
Charset implementations could override and use SharedSecrets or rely
upon inlining for fast access to String character data.
Tom