posted 22 years ago
Well, was your stream written using an ObjectOutputStream, and if so, did you perhaps construct output streams in a different order? Look in the source for java.io.ObjectInputStream: the constructor calls readStreamHeader() and throws a StreamCorruptedException if the header cannot be found. Apparently that is the case here. This header is normally written to the stream by the ObjectOutputStream constructor so unless you didn't use one, or wrote data into the stream before creating it, the header should be there.
- Peter
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd