ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
BufferedOutputStream outputBuff = new BufferedOutputStream(outputStream);

There is no performance gain in buffering an in-memory output stream. You will likely see a tiny decrease in performance instead.

I am pretty sure that you won't notice any difference, but what you can try is to start with a bigger buffer size (e.g. 1 MB) to prevent some copying of the data as it grows:
<http://docs.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html#ByteArrayOutputStream(int)>

Regards,

Johan

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to