title: invalid stream header: 47455420 - Java Input Stream
body: <p><strong>Hello World!</strong></p>
  
  <p>Currently I'm writing a simple Client/Server application which uses sockets to do the communitcation. My Client and my Server application are working fine with each other but if I try to query my Server application with a real web-browser (like Mozilla Firefox), then it comes to an exception.</p>
  
  <p>I think that my streams are not compatible with Mozilla Firefox. This little code line always leads to an IOException with the error message "invalid stream header: 47455420".</p>
  
  <p>From Firefox I try to connect via: <a href="http://localhost:7777/some-webpage.html" rel="nofollow">http://localhost:7777/some-webpage.html</a></p>
  
  <p>This is my code:</p>
  
  <pre><code>server = new ServerSocket(7777);
  Socket socket = server.accept();
  try
  {
      ObjectInputStream inputStream = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));
  }
  catch (IOException ex)
  {
      System.out.println("This exception happens :-(");
      System.out.println(ex.getLocalizedMessage());
  }
  </code></pre>
  
  <p>Does anybody know why this happens?
  Help is seen with pleasure.</p>
  
  <p>Greetings</p>
  
  <p>Benny</p>