[FOray-commit] SF.net SVN: foray: [7800] trunk/foray/foray-core/src/java/org/foray/core
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-07-19 01:35:07
|
Revision: 7800 Author: victormote Date: 2006-07-18 18:35:02 -0700 (Tue, 18 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7800&view=rev Log Message: ----------- Cleanup unused InputHandler logic. Modified Paths: -------------- trunk/foray/foray-core/src/java/org/foray/core/FOInputHandler.java trunk/foray/foray-core/src/java/org/foray/core/InputHandler.java Modified: trunk/foray/foray-core/src/java/org/foray/core/FOInputHandler.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOInputHandler.java 2006-07-19 01:32:44 UTC (rev 7799) +++ trunk/foray/foray-core/src/java/org/foray/core/FOInputHandler.java 2006-07-19 01:35:02 UTC (rev 7800) @@ -31,7 +31,6 @@ import org.xml.sax.InputSource; import org.xml.sax.XMLReader; -import java.io.File; import java.io.IOException; import java.net.URL; @@ -40,7 +39,6 @@ */ public class FOInputHandler extends InputHandler { - File fofile = null; URL foURL = null; public FOInputHandler (Log logger, URL url) { @@ -49,9 +47,6 @@ } public InputSource getInputSource () throws IOException { - if (fofile != null) { - return super.fileInputSource(fofile); - } InputSource inputSource = new InputSource(foURL.openStream()); return inputSource; } Modified: trunk/foray/foray-core/src/java/org/foray/core/InputHandler.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/InputHandler.java 2006-07-19 01:32:44 UTC (rev 7799) +++ trunk/foray/foray-core/src/java/org/foray/core/InputHandler.java 2006-07-19 01:35:02 UTC (rev 7800) @@ -26,17 +26,13 @@ -import org.foray.common.url.URLFactory; - import org.apache.commons.logging.Log; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; -import java.io.File; import java.io.IOException; -import java.net.MalformedURLException; import javax.xml.parsers.SAXParserFactory; @@ -49,30 +45,6 @@ } /** - * create an InputSource from a File - * - * @param file the File - * @return the InputSource 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(URLFactory.createURL("file", null, - path).toString()); - } catch (MalformedURLException e) { - throw new Error("unexpected MalformedURLException"); - } - } - - /** * Creates a SAX parser. * @return The newly-created SAX parser. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |