|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qedeq.base.io.UrlUtility
public final class UrlUtility
A collection of useful static methods for URL s.
| Method Summary | |
|---|---|
static java.lang.String |
createRelativePath(java.io.File origin,
java.io.File next)
Create relative address from origin to next. |
static java.lang.String |
easyUrl(java.lang.String url)
Simplify file URL by returning a file path. |
static boolean |
isSetConnectionTimeOutSupported()
Is setting of connection timeout supported in current environment? |
static boolean |
isSetReadTimeoutSupported()
Is setting of read timeout supported in current environment? |
static void |
saveUrlToFile(java.lang.String url,
java.io.File f,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String nonProxyHosts,
int connectTimeout,
int readTimeout,
LoadingListener listener)
Make local copy of an URL. |
static java.net.URL |
toUrl(java.io.File file)
Convert file in URL. |
static java.io.File |
transformURLPathToFilePath(java.net.URL url)
Convert URL path in file path. |
| 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 toUrl(java.io.File file)
file - File.
public static java.io.File transformURLPathToFilePath(java.net.URL url)
url - Convert this URL path.
public static final java.lang.String createRelativePath(java.io.File origin,
java.io.File next)
origin to next.
The resulting file path has "/" as directory name separator.
If the resulting file path is the same as origin specifies, we return "".
Otherwise the result will always have an "/" as last character.
origin - This is the original location. Must be a directory.next - This should be the next location. Must also be a directory.
public static java.lang.String easyUrl(java.lang.String url)
url - URL to simplify.
url.
public static void saveUrlToFile(java.lang.String url,
java.io.File f,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String nonProxyHosts,
int connectTimeout,
int readTimeout,
LoadingListener listener)
throws java.io.IOException
url - Save this URL.f - Save into this file. An existing file is overwritten.proxyHost - Use this proxy host.proxyPort - Use this port at proxy host.nonProxyHosts - This are hosts not to be proxied.connectTimeout - Connection timeout.readTimeout - Read timeout.listener - Here completion events are fired.
java.io.IOException - Saving failed.public static boolean isSetConnectionTimeOutSupported()
public static boolean isSetReadTimeoutSupported()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||