Results 1 to 4 of 4

Thread: StreamCorruptedException...

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Smile StreamCorruptedException...

    Can anybody explain why this would occur?

    I am trying to read in all the objects from a file, and I get the first one, then this error gets thrown

    Thanks
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  2. #2

  3. #3

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    yeah serialization. I used an ObjectOutputStream wrapped around a FileOutputStream, and the writeObject method to write it to the file, then the ObjectInputStream wrapped around a FileInputStream to read all the objects. But, it gets the first one (all Strings) and then throws that error.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Im not quite sure. I would have to see the code. The explnation
    of StreamCorruptedException in the documentation is a bit vague.

    Here's the definition the they give:

    Signals that the data stream being read by an ObjectInputStream
    has been corrupted and does not contain valid serialized data.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width