question: public void insertHTML ( HTMLDocument doc , int offset , String html , int popDepth , int pushDepth , HTML . Tag insertTag ) throws BadLocationException , IOException { if ( offset > doc . getLength ( ) ) { throw new BadLocationException ( "Invalid location" , offset ) ; } Parser p = ensureParser ( doc ) ; ParserCallback receiver = doc . getReader ( offset , popDepth , pushDepth , insertTag ) ; Boolean ignoreCharset = ( Boolean ) doc . getProperty ( "IgnoreCharsetDirective" ) ; p . parse ( new StringReader ( html ) , receiver , ( ignoreCharset == null ) ? false : ignoreCharset . booleanValue ( ) ) ; receiver . flush ( ) ; }
target:  Inserts HTML into an existing document.