BTW, while updating the file I found an opportunity for a little
optimization. In the servlet's case the ByteArrayOutputStream should not
be instantiated with the default constructor. This only allocates 64
bytes initially. Every time the buffer runs out of space the old buffer
is discarded and a new one with twice the previous space is allocated.
If you do "new ByteArrayOutputStream(16384)" (or an even higher number
depending on the documents you serve), you will get a slight performance
improvement almost for free. :-)
On 10.03.2005 13:02:22 Ben Gill wrote:
> Maybe the example can be updated with my version? I have not compiled
> but I know it works...
Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.
Company reg. no. 3875000.
3 Bishops Square
Hatfield Business Park