|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ideanest.util.Files
Method Summary | |
static java.lang.String |
filenameToURI(java.lang.String str)
Fixes a platform dependent filename to standard URI form. |
static java.net.URL |
fileToURL(java.io.File file)
|
static boolean |
isParent(java.io.File parent,
java.io.File child)
Check whether the child file is eventually contained within the
parent file. |
static java.lang.String |
URIToFilename(java.lang.String str)
Fixes a platform dependent filename to standard URI form. |
static java.io.File |
URLToFile(java.net.URL url)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String filenameToURI(java.lang.String str)
str
- The string to fix.
public static java.net.URL fileToURL(java.io.File file) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public static boolean isParent(java.io.File parent, java.io.File child) throws java.io.IOException
child
file is eventually contained within the
parent
file. The algorithm uses the canonical version of the
path for both files.
parent
- the candidate parent file, which should be a directorychild
- the candidate child, which can be a directory or a file
child
is in fact contained within parent
java.io.IOException
- if something fails and the answer is inconclusivepublic static java.lang.String URIToFilename(java.lang.String str)
str
- The string to fix.
public static java.io.File URLToFile(java.net.URL url) throws java.net.MalformedURLException
java.net.MalformedURLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |