The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Rachna on February 24, 2001 at 1:01 AM

I have opened a file using
ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream("filename",true));
now my problem is that when i try to read the file using

ObjectInputStream out=new ObjectInputStream(new

i get an error that Type code out of range, is -84
what should i do?

> > You haven't really provided enough info but are you remembering to close the file after writing with out.close() to make sure the buffer is flushed (all data transferred from memory to file).

> > If I recall correctly, flushing the buffer is off by default when serializing objects (one of the ObjectOutputStream constructors takes a boolean for this - check the doc).

> > Hope that helps

> > Richard


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us