Review/comment needed for the new public java.util.Base64 class

Xueming Shen xueming.shen at
Sat Oct 20 00:03:59 UTC 2012

I see a 20% performance gain on server vm if switch to pure char[] based 
and then use the sharedSecrets to avoid the copy. The dis-advantage is 
(1) have to
use the sharedSecrets and (2) can't share the same between the 
and encode(String).

Anyway it appears to be an alternative for performance improvement.


On 10/18/2012 01:07 PM, Mike Duigou wrote:
> I wonder if there would be advantage in using a SharedSecrets mechanism to allow construction of a String directly from a char array. The intermediate byte array seems wasteful especially for what is likely to be a heavily used path.
> Mike
> On Oct 17 2012, at 19:10 , Xueming Shen wrote:
>> Hi
>> Webrev has been updated with following changes
>> (1) added a pair of en/decode(ByteBuffer src, ByteBuffer dst) methods
>> (2) some minor spec clarification regarding the "end of decoding"
>> (3) performance tuning.
>> webrev:
>> some performance scores:
>> -Sherman

More information about the core-libs-dev mailing list