title: how to load html to styledocument
body: <p>I'm using a StyleDocument to display my content in a JTextPane.
  I searched for a while and saw that I can write with the HTMLEditorKit the document I get from the textpane to a file. But when I want to read this file with the HTMLEditorKit it doesn't parse in the right document. I get two different results:</p>
  
  <ol>
  <li>I get the plain html code in my textpane</li>
  <li>I get no content in my textpane</li>
  </ol>
  
  <p><strong>Saving:</strong></p>
  
  <pre><code>Document doc = textpane.getStyledDocument();
  HTMLEditorKit kit = new HTMLEditorKit();
  kit.write(new FileOutputStream("path"), doc, 0, doc.getLength());
  </code></pre>
  
  <p><strong>Loading (2 versions):</strong></p>
  
  <pre><code>HTMLEditorKit kit = new HTMLEditorKit();
  Document doc = null;
  Document doc2 = kit.createDefaultDocument();
  
  kit.read(new FileInputStream("path"), doc, 0);
  kit.read(new FileInputStream("path"), doc2, 0);
  
  textpane.setDocument(doc);
  textpane.setDocument(doc2);
  </code></pre>