title: .NET to Java serialization/deserialization compatibility
body: <p>Are there any compatibility issues to take care of when serailizing an object in .NET and then deserializing in Java? </p>
  
  <p>I am facing problems in de-serializing an object in java which has been serialized in .NET</p>
  
  <p>Here is the detailed problem statement:</p>
  
  <p>In .NET platform i have a cookie. 
  1. Cookie is serialized 
  2. then it is encrypted using Triple DES algo. 
  3. Send it across to Java application </p>
  
  <p>In Java platform 
  1. Decrypt the cookie using Triple DES which gives some bytes 
  2. Deserialize the bytes using something like </p>
  
  <p>new ObjectInputStream( new ByteArrayInputStream(byte[] decryptedCookie)).readObject(); </p>
  
  <p>The exception stack trace I get is: 
  java.io.StreamCorruptedException: invalid stream header: 2F774555 
  at java.io.ObjectInputStream.readStreamHeader(Unknown Source) 
  at java.io.ObjectInputStream.(Unknown Source) </p>