|
||||||||||
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 File |
toFile(URL url)
Transforms a URL into a File. |
static File |
toFileChecked(URL url)
Transforms a URL into a File. |
static URL |
toURL(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 File toFileChecked(URL url) throws IOException
URLDecoder
.
null
if the url does not use the 'file' protocol
NullPointerException
- if the url is null
IOException
- if there is an IO problempublic static File toFile(URL url) throws IOException
URLDecoder
.
NullPointerException
- if the url is null
IllegalArgumentException
- if the url does not use the 'file' protocol
IOException
- if there is an IO problempublic static URL toURL(File file)
file
- the file to be transformed
NullPointerException
- if the specified file is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |