Jump to content
Changes to the Jaspersoft community edition download ×

Serialize/Deserialize problem

Recommended Posts

By: John Pollard - johnnypoll

Serialize/Deserialize problem

2002-05-08 02:22

As I generate reports on a server and pass the results to a client I must serialize and deserialize the JasperPrint object.


Once deserialized, newline characters have been damaged; when viewing the report I can see little squares and no line break where the newline character was. Prior to serializing the JasperPrint it views ok.


Here is how I serialize and deserialize it:


ByteArrayOutputStream out = new ByteArrayOutputStream();

ObjectOutputStream objectOut = new ObjectOutputStream(out);



ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

ObjectInputStream objectIn = new ObjectInputStream(in);

JasperPrint jasperPrint = (JasperPrint) objectIn.readObject();


Is there any workaround to this problem; could I do some kind of substitution on the bytes to correct the newlines before (or after) deserializing?




Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...