Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2004, 08:49 AM
Registered User
 
Join Date: Nov 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Serialization stream header

hi,

I have to write objects in a file using serialization and ObjectOutputStream. a header is written at the beginning of the stream/file, before my objects"records".
My trouble is: if i reopen my stream in append mode on the same file, I'll have a second header at the end of the file(after the previous records), all the new records will be added after.In this case, I have the first header at the beginning of the file, some records a new header and the last records...

The trouble is that, when I read the file back with ObjectInputStream, it runs correctly until it reaches the stream header inside the file(the second one written in append)!

what shall I do to avoid this?

thank you in advance,

Michael.





Similar Threads
Thread Thread Starter Forum Replies Last Post
serialization taheernawaz ASP.NET 1.x and 2.0 Application Design 0 December 12th, 2007 03:32 AM
question about Serialization hertendreef ASP.NET 2.0 Basics 2 February 27th, 2007 04:03 PM
T-SQL Serialization blueFrench Pro VB Databases 0 July 15th, 2004 08:01 PM
XML Serialization rajeshnerenki General .NET 0 June 14th, 2004 08:50 AM
XML Header serialization problem PMNorris Pro VB.NET 2002/2003 0 January 5th, 2004 07:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.