Problems with java ByteArrayOutputStream

Hi to everybody,

I’ve written a bridge between jruby and jasperreport through a java
object that has a method, printReport, that given the name of the
jasperreport template and the map of the input parameters (if they are
needed) gives me back the pdf report as a java ByteArrayOutputStream.

Until the flow of operations is in the java objects everything is ok. I
verified
that immediately before leaving the printReport method the
ByteArrayOutputStream
variable is correctly populated and the pdf contained herein is ok ( I
tried to read it through Acrobat). But as soon as the buffer flows from
java to jruby something broke and the pdf displays as a blank page :frowning:
(it seems lost).

Is there someone that has some ideas or assumptions on what is going on
and can
help me on that. I’ve to give the application to the customer next week
so
I’m a bit worried about that…

Any help is highly appreciated.

Kind regards

Sergio