Code example for ContentHandler

Methods: endDocumentendElement

0
   * Finish visitor 
   */ 
  @Override 
  public void close(Throwable error) throws IOException {
    try { 
      contentHandler.endElement("", "", "EDITS");
      if (error != null) {
        String msg = error.getMessage();
        XMLUtils.addSaxString(contentHandler, "ERROR",
            (msg == null) ? "null" : msg);
      } 
      contentHandler.endDocument();
    } 
    catch (SAXException e) {
      throw new IOException("SAX error: " + e.getMessage());
    } 
    out.close();
  } 
 
  @Override