|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jverbnet.util.ResourceUtils
public class ResourceUtils
A few utilities relating to Files and URLs.
Constructor Summary | |
---|---|
ResourceUtils()
|
Method Summary | |
---|---|
static java.io.File |
toFile(java.net.URL url)
Transforms a URL into a File. |
static java.io.File |
toFileChecked(java.net.URL url)
Transforms a URL into a File. |
static java.net.URL |
toURL(java.io.File file)
Transforms a file into a URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceUtils()
Method Detail |
---|
public static java.io.File toFileChecked(java.net.URL url) throws java.io.IOException
URLDecoder
.
null
if the url does not use the 'file' protocol
java.lang.NullPointerException
- if the url is null
java.io.IOException
- if there is an IO problempublic static java.io.File toFile(java.net.URL url) throws java.io.IOException
URLDecoder
.
java.lang.NullPointerException
- if the url is null
java.lang.IllegalArgumentException
- if the url does not use the 'file' protocol
java.io.IOException
- if there is an IO problempublic static java.net.URL toURL(java.io.File file)
file
- the file to be transformed
java.lang.NullPointerException
- if the specified file is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |