aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/image
diff options
context:
space:
mode:
authorMehdi Houshmand <mehdi@apache.org>2012-09-19 15:37:57 +0000
committerMehdi Houshmand <mehdi@apache.org>2012-09-19 15:37:57 +0000
commitc9cbf7e0a418fb7735f6d4a42632b867f3dab36c (patch)
tree33a6758d61d589fe3a6163edf8e3e0dbd55b0022 /src/java/org/apache/fop/image
parentc5a2f0959ec4116022f8e87cd9114b7b152a6c98 (diff)
downloadxmlgraphics-fop-c9cbf7e0a418fb7735f6d4a42632b867f3dab36c.tar.gz
xmlgraphics-fop-c9cbf7e0a418fb7735f6d4a42632b867f3dab36c.zip
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
Diffstat (limited to 'src/java/org/apache/fop/image')
-rw-r--r--src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java5
-rw-r--r--src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java5
2 files changed, 6 insertions, 4 deletions
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);