aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/apps/InputHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/apps/InputHandler.java')
-rw-r--r--src/java/org/apache/fop/apps/InputHandler.java40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/java/org/apache/fop/apps/InputHandler.java b/src/java/org/apache/fop/apps/InputHandler.java
index a172ec443..e094168ed 100644
--- a/src/java/org/apache/fop/apps/InputHandler.java
+++ b/src/java/org/apache/fop/apps/InputHandler.java
@@ -18,18 +18,8 @@
package org.apache.fop.apps;
-// SAX
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-// Java
-import java.net.URL;
-import java.io.File;
-
/**
* Abstract super class for input handlers.
- * Should be used to abstract the various possibilities on how input
- * can be provided to FOP (but actually isn't).
*/
public abstract class InputHandler {
@@ -50,34 +40,4 @@ public abstract class InputHandler {
*/
public void render(Fop fop) throws FOPException {}
- /**
- * Creates an InputSource from a URL.
- * @param url URL to use
- * @return the newly created InputSource
- */
- public static InputSource urlInputSource(URL url) {
- return new InputSource(url.toString());
- }
-
- /**
- * Creates an <code>InputSource</code> from a <code>File</code>
- * @param file the <code>File</code>
- * @return the <code>InputSource</code> created
- */
- public static InputSource fileInputSource(File file) {
- /* this code adapted from James Clark's in XT */
- String path = file.getAbsolutePath();
- String fSep = System.getProperty("file.separator");
- if (fSep != null && fSep.length() == 1) {
- path = path.replace(fSep.charAt(0), '/');
- }
- if (path.length() > 0 && path.charAt(0) != '/') {
- path = '/' + path;
- }
- try {
- return new InputSource(new URL("file", null, path).toString());
- } catch (java.net.MalformedURLException e) {
- throw new RuntimeException("unexpected MalformedURLException");
- }
- }
}