From c9cbf7e0a418fb7735f6d4a42632b867f3dab36c Mon Sep 17 00:00:00 2001 From: Mehdi Houshmand Date: Wed, 19 Sep 2012 15:37:57 +0000 Subject: Moved the I/O interfaces to XGC and updated code with new resolution mechanism git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_XGC_URI_Resolution@1387645 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java | 5 +++-- src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/java/org/apache/fop/image') diff --git a/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java index 022ff462f..3aa340a4a 100644 --- a/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java +++ b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java @@ -45,6 +45,7 @@ import org.apache.xmlgraphics.image.loader.ImageSize; import org.apache.xmlgraphics.image.loader.impl.AbstractImagePreloader; import org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM; import org.apache.xmlgraphics.image.loader.util.ImageUtil; +import org.apache.xmlgraphics.io.XmlSourceUtil; import org.apache.xmlgraphics.util.MimeConstants; import org.apache.xmlgraphics.util.UnitConv; @@ -79,7 +80,7 @@ public class PreloaderSVG extends AbstractImagePreloader { } } if (info != null) { - ImageUtil.closeQuietly(src); //Image is fully read + XmlSourceUtil.closeQuietly(src); //Image is fully read } return info; } @@ -119,7 +120,7 @@ public class PreloaderSVG extends AbstractImagePreloader { DOMSource domSrc = (DOMSource)src; doc = (SVGDocument)domSrc.getNode(); } else { - in = new UnclosableInputStream(ImageUtil.needInputStream(src)); + in = new UnclosableInputStream(XmlSourceUtil.needInputStream(src)); int length = in.available(); in.mark(length + 1); SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory( diff --git a/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java b/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java index 3bef0f41d..43341cbe6 100644 --- a/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java +++ b/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java @@ -38,6 +38,7 @@ import org.apache.xmlgraphics.image.loader.ImageInfo; import org.apache.xmlgraphics.image.loader.ImageSize; import org.apache.xmlgraphics.image.loader.impl.AbstractImagePreloader; import org.apache.xmlgraphics.image.loader.util.ImageUtil; +import org.apache.xmlgraphics.io.XmlSourceUtil; import org.apache.fop.util.UnclosableInputStream; @@ -69,7 +70,7 @@ public class PreloaderWMF extends AbstractImagePreloader { } } if (info != null) { - ImageUtil.closeQuietly(src); //Image is fully read + XmlSourceUtil.closeQuietly(src); //Image is fully read } return info; } @@ -88,7 +89,7 @@ public class PreloaderWMF extends AbstractImagePreloader { ImageContext context) { // parse document and get the size attributes of the svg element - InputStream in = new UnclosableInputStream(ImageUtil.needInputStream(src)); + InputStream in = new UnclosableInputStream(XmlSourceUtil.needInputStream(src)); try { in.mark(4 + 1); -- cgit v1.2.3