|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.aalto.util.URLUtil
public final class URLUtil
| Method Summary | |
|---|---|
static java.lang.String |
fileToSystemId(java.io.File f)
|
static java.net.URL |
fileToURL(java.io.File f)
This method is added because the default conversion using file.toURL() turns out to be rather slow, as
it tries to figure out if the file is actually a directory. |
static java.io.InputStream |
inputStreamFromURL(java.net.URL url)
Method that tries to get a stream (ideally, optimal one) to read from the specified URL. |
static java.io.OutputStream |
outputStreamFromURL(java.net.URL url)
Method that tries to get a stream (ideally, optimal one) to write to the resource specified by given URL. |
static java.net.URL |
urlFromCurrentDir()
Method that tries to create and return URL that denotes current working directory. |
static java.net.URL |
urlFromSystemId(java.lang.String sysId)
Method that tries to figure out how to create valid URL from a system id, without additional contextual information. |
static java.net.URL |
urlFromSystemId(java.lang.String sysId,
java.net.URL ctxt)
|
static java.lang.String |
urlToSystemId(java.net.URL u)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.net.URL urlFromSystemId(java.lang.String sysId)
throws java.io.IOException
java.io.IOException
public static java.net.URL urlFromSystemId(java.lang.String sysId,
java.net.URL ctxt)
throws java.io.IOException
java.io.IOException
public static java.net.URL urlFromCurrentDir()
throws java.io.IOException
java.io.IOException
public static java.io.InputStream inputStreamFromURL(java.net.URL url)
throws java.io.IOException
java.io.IOException
public static java.io.OutputStream outputStreamFromURL(java.net.URL url)
throws java.io.IOException
java.io.IOException
public static java.net.URL fileToURL(java.io.File f)
throws java.io.IOException
file.toURL() turns out to be rather slow, as
it tries to figure out if the file is actually a directory.
Now, for our use cases this is irrelevant, so we can optimize
out that expensive part.
java.io.IOException
public static java.lang.String fileToSystemId(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String urlToSystemId(java.net.URL u)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||