Re: [PATCH] CipherStream produces new byte array on every update or doFinal operation

2015-02-17 Thread Dai Nakanishi
, CipherInputStream allocates the new array. Dai On Tue, 17 Feb 2015 14:21:50 +0100 Florian Weimer wrote: > On 02/17/2015 01:53 PM, Dai Nakanishi wrote: > > +} catch (ShortBufferException e) { > > +obuffer = null; > > +throw new IOException(e); >

[PATCH] CipherStream produces new byte array on every update or doFinal operation

2015-02-17 Thread Dai Nakanishi
Hi, CipherInputStream and CipherOutputStream call the Cipher methods update and doFinal which produce new byte array. It may consume a large amount of memory. The purpose of my patch is to avoid this. Could you review the patch? Thanks, Dai --- old/src/share/classes/javax/crypto/CipherInputStre