I am trying to deserialize and read a file which has been previously serialized using VC++. Is there a way to read a file in Java serialized by VC++. When i read using ObjectInputStream, exception is thrown (StreamCorruptedException). The file structure of the serialized file is as below:
m_DeviceChanCount; (unsigned char)
m_ModelID; (unsigned char)
m_ChanNum; (unsigned char)
m_LastBlock; (unsigned short)
m_ScanTime; (unsigned char)
m_Owner; (unsigned char)
m_Gain; (unsigned char)
a; (unsigned char)
b; (unsigned char)
could somebody help me deserialize and read this file using Java. Any help and sample source code is greatly appreciated.
Obviously that canít be done.
When you try to deserialize a java object it must have been serialized using java.
What you can do is define a protocol between the two applications. E.g. write the file is a specific format, and expect this format when reading it.
Or be nice and snazzy and use XML as an exchange format.... :-D
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center