/** * <p>Reads a Document from the given <code>URL</code></p> * * @param url <code>URL</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(URL url) throws DocumentException, IOException, XmlPullParserException { String systemID = url.toExternalForm(); return read(createReader(url.openStream()), systemID); }
/** * <p>Reads a Document from the given stream</p> * * @param in <code>InputStream</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(InputStream in) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in)); }
/** * <p>Reads a Document from the given stream</p> * * @param in <code>InputStream</code> to read from. * @param systemID is the URI for the input * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(InputStream in, String systemID) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in), systemID); }
/** * <p>Reads a Document from the given stream</p> * * @param charSet the charSet that the input is encoded in * @param in <code>InputStream</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(String charSet, InputStream in) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in, charSet)); }
/** * <p>Reads a Document from the given stream</p> * * @param in <code>InputStream</code> to read from. * @param systemID is the URI for the input * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(InputStream in, String systemID) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in), systemID); }
/** * <p>Reads a Document from the given <code>URL</code></p> * * @param url <code>URL</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(URL url) throws DocumentException, IOException, XmlPullParserException { String systemID = url.toExternalForm(); return read(createReader(url.openStream()), systemID); }
/** * <p>Reads a Document from the given stream</p> * * @param in <code>InputStream</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(InputStream in) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in)); }
/** * <p>Reads a Document from the given stream</p> * * @param charSet the charSet that the input is encoded in * @param in <code>InputStream</code> to read from. * @return the newly created Document instance * @throws DocumentException if an error occurs during parsing. */ public Document read(String charSet, InputStream in) throws DocumentException, IOException, XmlPullParserException { return read(createReader(in, charSet)); }