public abstract class URLHelper
extends java.lang.Object
Constructor and Description |
---|
URLHelper() |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
connect(java.lang.String loc)
Connect to the specified URL.
|
static java.io.InputStream |
connect(URLString loc)
Connect to the URL specified by this URLString
|
static java.util.Map<java.lang.String,java.lang.String> |
queryStringToMap(java.lang.String queryString,
java.lang.String charset)
Convert a query string into a map.
|
public static java.io.InputStream connect(URLString loc) throws java.io.IOException
Connect to the URL specified by this URLString
loc
- the URL location.java.io.IOException
- on error.public static java.io.InputStream connect(java.lang.String loc) throws java.io.IOException, java.net.URISyntaxException
loc
- the URLjava.io.IOException
java.net.URISyntaxException
public static java.util.Map<java.lang.String,java.lang.String> queryStringToMap(java.lang.String queryString, java.lang.String charset) throws java.io.UnsupportedEncodingException
queryString
- the query string (e.g. a=b&c=d&e=f)charset
- the character set for URLDecoder.decode(String, String)
purposesjava.io.UnsupportedEncodingException