/** * This builds a document from the supplied input source. * * @param in * <code>InputSource</code> to read from * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed */ @Override public Document build(final InputSource in) throws JDOMException, IOException { try { return getEngine().build(in); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied input stream. * </p> * * @param in * <code>InputStream</code> to read from * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed. */ @Override public Document build(final InputStream in) throws JDOMException, IOException { try { return getEngine().build(in); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied filename. * </p> * * @param file * <code>File</code> to read from * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed */ @Override public Document build(final File file) throws JDOMException, IOException { try { return getEngine().build(file); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied URL. * </p> * * @param url * <code>URL</code> to read from. * @return <code>Document</code> - resultant Document object. * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed. */ @Override public Document build(final URL url) throws JDOMException, IOException { try { return getEngine().build(url); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied input stream. * </p> * * @param in * <code>InputStream</code> to read from. * @param systemId * base for resolving relative URIs * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed */ @Override public Document build(final InputStream in, final String systemId) throws JDOMException, IOException { try { return getEngine().build(in, systemId); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied Reader. It's the programmer's * responsibility to make sure the reader matches the encoding of the file. * It's often easier and safer to use an InputStream rather than a Reader, * and to let the parser auto-detect the encoding from the XML declaration. * </p> * * @param characterStream * <code>Reader</code> to read from * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed */ @Override public Document build(final Reader characterStream) throws JDOMException, IOException { try { return getEngine().build(characterStream); } finally { if (!reuseParser) { engine = null; } } }
/** * <p> * This builds a document from the supplied Reader. It's the programmer's * responsibility to make sure the reader matches the encoding of the file. * It's often easier and safer to use an InputStream rather than a Reader, * and to let the parser auto-detect the encoding from the XML declaration. * </p> * * @param characterStream * <code>Reader</code> to read from. * @param systemId * base for resolving relative URIs * @return <code>Document</code> resultant Document object * @throws JDOMException * when errors occur in parsing * @throws IOException * when an I/O error prevents a document from being fully parsed */ @Override public Document build(final Reader characterStream, final String systemId) throws JDOMException, IOException { try { return getEngine().build(characterStream, systemId); } finally { if (!reuseParser) { engine = null; } } }
return getEngine().build(systemId); } catch (IOException ioe) {