/** * Called at the end of the document to wrap it up. * Will flush the output stream and throw an exception * if any I/O error occured while serializing. * * @throws SAXException An I/O exception occured during * serializing */ public void endDocument() throws SAXException { try { // Print all the elements accumulated outside of // the root element. serializePreRoot(); // Flush the output, this is necessary for fStrBuffered output. _printer.flush(); } catch ( IOException except ) { throw new SAXException( except ); } }
/** * Called at the end of the document to wrap it up. * Will flush the output stream and throw an exception * if any I/O error occured while serializing. * * @throws SAXException An I/O exception occured during * serializing */ public void endDocument() throws SAXException { try { // Print all the elements accumulated outside of // the root element. serializePreRoot(); // Flush the output, this is necessary for fStrBuffered output. _printer.flush(); } catch ( IOException except ) { throw new SAXException( except ); } }
public void endElementIO( String tagName ) throws IOException { ElementState state; // Works much like content() with additions for closing // an element. Note the different checks for the closed // element's state and the parent element's state. state = getElementState(); // Leave the element state and update that of the parent // (if we're not root) to not empty and after element. state = leaveElementState(); state.afterElement = true; state.empty = false; if ( isDocumentState() ) _printer.flush(); }
public void endElementIO( String tagName ) throws IOException { ElementState state; // Works much like content() with additions for closing // an element. Note the different checks for the closed // element's state and the parent element's state. state = getElementState(); // Leave the element state and update that of the parent // (if we're not root) to not empty and after element. state = leaveElementState(); state.afterElement = true; state.empty = false; if ( isDocumentState() ) _printer.flush(); }
/** * Serializes the DOM element using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param elem The element to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( Element elem ) throws IOException { reset(); prepare(); serializeNode( elem ); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM element using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param elem The element to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( Element elem ) throws IOException { reset(); prepare(); serializeNode( elem ); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document fragmnt using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param elem The element to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( DocumentFragment frag ) throws IOException { reset(); prepare(); serializeNode( frag ); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document fragmnt using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param elem The element to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( DocumentFragment frag ) throws IOException { reset(); prepare(); serializeNode( frag ); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes a node using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param node Node to serialize * @throws IOException An I/O exception occured while serializing */ public void serialize( Node node ) throws IOException { reset(); prepare(); serializeNode( node ); //Print any PIs and Comments which appeared in 'node' serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes a node using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param node Node to serialize * @throws IOException An I/O exception occured while serializing */ public void serialize( Node node ) throws IOException { reset(); prepare(); serializeNode( node ); //Print any PIs and Comments which appeared in 'node' serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param doc The document to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( Document doc ) throws IOException { reset(); prepare(); serializeNode( doc ); serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param doc The document to serialize * @throws IOException An I/O exception occured while * serializing */ public void serialize( Document doc ) throws IOException { reset(); prepare(); serializeNode( doc ); serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if ( isDocumentState() ) _printer.flush();
state.empty = false; if (isDocumentState()) _printer.flush();
state.empty = false; if (isDocumentState()) _printer.flush();