/** * Creates a SVG Document instance. * @param uri The document URI. * @param r The document reader. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, Reader r) throws IOException { Document doc; InputSource is = new InputSource(r); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }
/** * Creates a SVG Document instance. * @param uri The document URI. * @param inp The document input stream. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, InputStream inp) throws IOException { Document doc; InputSource is = new InputSource(inp); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }
/** * Creates a SVG Document instance. * @param uri The document URI. * @param inp The document input stream. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, InputStream inp) throws IOException { Document doc; InputSource is = new InputSource(inp); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }
/** * Creates a SVG Document instance. * @param uri The document URI. * @param r The document reader. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, Reader r) throws IOException { Document doc; InputSource is = new InputSource(r); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }
/** * Creates a SVG Document instance. * @param uri The document URI. * @param r The document reader. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, Reader r) throws IOException { Document doc; InputSource is = new InputSource(r); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }
/** * Creates a SVG Document instance. * @param uri The document URI. * @param inp The document input stream. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri, InputStream inp) throws IOException { Document doc; InputSource is = new InputSource(inp); is.setSystemId(uri); try { doc = super.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is); if (uri != null) { ((SVGOMDocument)doc).setParsedURL(new ParsedURL(uri)); } AbstractDocument d = (AbstractDocument) doc; d.setDocumentURI(uri); d.setXmlStandalone(isStandalone); d.setXmlVersion(xmlVersion); } catch (MalformedURLException e) { throw new IOException(e.getMessage()); } return doc; }