net.sf.kernow.util
Class FileUtil

java.lang.Object
  extended by net.sf.kernow.util.FileUtil

public class FileUtil
extends java.lang.Object


Constructor Summary
FileUtil()
           
 
Method Summary
static javax.xml.transform.Result createResult(java.lang.String s)
          Creates a Result from a String by calling createURLFromString()
static javax.xml.transform.Source createSource(java.lang.String s)
          Creates a Source from a String by calling createURLFromString()
static java.net.URI createURI(java.lang.String s)
          Creates a URI from a given String.
static java.lang.String escapeSpaces(java.lang.String s)
          Copied verbatim from Saxon's ResolveURI.java Replace spaces by %20
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

escapeSpaces

public static java.lang.String escapeSpaces(java.lang.String s)
Copied verbatim from Saxon's ResolveURI.java Replace spaces by %20


createURI

public static java.net.URI createURI(java.lang.String s)
                              throws java.net.URISyntaxException
Creates a URI from a given String. It checks to see if the String starts with "http" and creates a URI after escaping the spaces, otherwise it creates a File and then a URI. This is the only way I can see to create URI from both Windows paths and web addresses

Throws:
java.net.URISyntaxException

createSource

public static javax.xml.transform.Source createSource(java.lang.String s)
                                               throws java.net.URISyntaxException
Creates a Source from a String by calling createURLFromString()

Throws:
java.net.URISyntaxException

createResult

public static javax.xml.transform.Result createResult(java.lang.String s)
                                               throws java.net.URISyntaxException
Creates a Result from a String by calling createURLFromString()

Throws:
java.net.URISyntaxException