From: Keats K. <ke...@xa...> - 2006-03-16 16:18:17
|
Alex Twisleton-Wykeham-Fiennes wrote: >... obvious to remove is >the ByteBufferOutputStream.reset() which currently is implemented as:- > > /** > * Clear the contents of the byte buffer. Also shrinks the byte buffer > * to the size specified during construction of this ByteBufferOutputStream > */ > public void reset () > { > _pos = 0; > _buf = new byte[_initialSize]; > } > >This is currently (in my testbed) only ever getting invoked during:- > > ByteBufferOutputStream.reset() > > [I assume this is a typo and it doesn't actually call itself. ] > FastWriter.flush() > > I agree that this shouldn't re-allocate. > FastWriter.close() > > No sense allocating on a close. > WMTemplate.evaluateAsBytes() > > I'm not quite sure why this would reset anything. It seems like you should explicitly flush or close after evaluating if you want to. Keats |