title: java.io.StreamCorruptedException: invalid stream header: 4D6F7374
body: <p>The Java code is           </p>
  
  <pre><code>        ObjectInputStream ois=new ObjectInputStream(new FileInputStream("src/Stringdata.txt"));    
          String s=(String)ois.readObject();
          System.out.println(s.toString());
  
          } catch (IOException e) {
  
              e.printStackTrace();
          } catch (ClassNotFoundException e) {
  
              e.printStackTrace();
          }
  </code></pre>
  
  <p>here am getting java.io.StreamCorruptedException: invalid stream header: 4D6F7374 this error please help me</p>