Adriano Leite Ribero wrote:
>       try{
>         if (baos.toString()!= null)
>           ret = new String(baos.toString());
>       } catch (Exception e){...}
>       return ret; /* this string will be sent to the browser output */

Another thought: what if you save the contents of ret to a file?
Maybe you're responsible for shaving off the higher byte yourself.
Why are you returning a String in this method, why not a byte[].
When writing the result to the response.getOutputStream or the
PrintWriter, the String will have to be converted to a byte[] anyway.

Not only will you save in performance, you'll also avoid nasty problems
while converting bytes from and to a String.

br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to