Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 1st, 2004, 08:49 AM
Registered User
Join Date: Nov 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Serialization stream header


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,

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 07:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.