Here’s an updated version with the encoder also modified for symmetry. Brian
On Apr 10, 2014, at 11:23 AM, Xueming Shen <xueming.s...@oracle.com> wrote: > String version has the cache mechanism of charset -> CharsetDe/Encoder, so if > cache hits, you don't need to have String->Charset lookup. > > We don't cache the "external" charset though for de/encode(Charset ...), so we > always need to create a "new" CharsetDe/Encoder everytime the de/encode() > method gets invoked.