public void read(Reader in, Document document, int offset)
public void read(InputStream in, Document document, int offset)
  public void read(Reader in, Document document, int offset)    throws BadLocationException, IOException  {    BufferedReader reader = new BufferedReader(in);    String line;    StringBuffer content = new StringBuffer();    while ((line = reader.readLine()) != null)      {	content.append(line);	content.append("\n");      }        document.insertString(offset, content.substring(0, content.length() - 1),			  SimpleAttributeSet.EMPTY);  }