aspose file tools
The moose likes I/O and Streams and the fly likes java.io.StreamCorruptedException: invalid stream header: C2ACC3AD Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "java.io.StreamCorruptedException: invalid stream header: C2ACC3AD" Watch "java.io.StreamCorruptedException: invalid stream header: C2ACC3AD" New topic
Author

java.io.StreamCorruptedException: invalid stream header: C2ACC3AD

prasad phatak
Greenhorn

Joined: Sep 18, 2011
Posts: 5
Hi All,
please help me with this,the code prompt error on the console

java.io.StreamCorruptedException: invalid stream header: C2ACC3AD
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at com.etp.dim.ui.CreateMapScreen$1.mouseClicked(CreateMapScreen.java:1146)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


When I tried to debugg the code,I found out its basically trying to get some data from a .mpf file. Can someone please me a precise reason why is this happening and an appropriate solution too.
Rob Spoor
Saloon Keeper

Joined: Oct 27, 2005
Posts: 18370

Did you create this file with an ObjectOutputStream? If the answer is no then you should not use ObjectInputStream to read it. It requires some header data which is written by ObjectOutputStream but apparently is missing in your file.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
 
subject: java.io.StreamCorruptedException: invalid stream header: C2ACC3AD
 
Threads others viewed
null pointer exception when clicking on JCheckbox
display CGM images iingn web browser with out using any viewer in java
unexpected exception:please help
SOS!!!!!!!!!!
soap and utf-8 encoding issue
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture