|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjlibs.core.net.URLUtil
public class URLUtil
| Constructor Summary | |
|---|---|
URLUtil()
|
|
| Method Summary | |
|---|---|
static URLConnection |
createUnCertifiedConnection(URL url,
Proxy proxy)
Creates connection to the specified url. |
static Map<String,String> |
getQueryParams(String uri,
String encoding)
returns Query Parameters in specified uri as Map. |
static void |
main(String[] args)
|
static URI |
relativize(String base,
String child)
|
static URI |
resolve(String base,
String child)
|
static String |
suggestFile(URI uri,
String extension)
|
static String |
suggestPrefix(Properties suggested,
String uri)
|
static String |
toSystemID(URL url)
|
static URI |
toURI(String str)
Constructs URI from given string. |
static URI |
toURI(URL url)
Constructs URI from given URL. |
static URL |
toURL(String systemID)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLUtil()
| Method Detail |
|---|
public static URI toURI(String str)
URI from given string.
The URISyntaxException is rethrown as IllegalArgumentException
public static URI toURI(URL url)
URI from given URL.
The URISyntaxException is rethrown as IllegalArgumentException
public static URL toURL(String systemID)
public static String toSystemID(URL url)
public static URI resolve(String base,
String child)
public static URI relativize(String base,
String child)
public static Map<String,String> getQueryParams(String uri,
String encoding)
throws URISyntaxException,
UnsupportedEncodingException
Map.
key will be param name and value wil be param value.
uri - The string to be parsed into a URIencoding - if null, UTF-8 will be used
URISyntaxException - in case of invalid uri
UnsupportedEncodingException - if named character encoding is not supported
public static String suggestFile(URI uri,
String extension)
public static String suggestPrefix(Properties suggested,
String uri)
public static URLConnection createUnCertifiedConnection(URL url,
Proxy proxy)
throws IOException
https the connection
created doesn't validate any certificates.
url - url to which connection has to be createdproxy - proxy to be used. can be null
URLConnection. the connection is not yet connected
IOException - if an I/O exception occurs
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||