public class URLUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String url)
Decodes the specified (portion of a) URL.
|
static URLConnection |
prepareForAuthentication(URLConnection connection)
Prepares an url connection for authentication if necessary.
|
static URLConnection |
prepareForSSL(URLConnection connection)
Prepares an url connection for authentication if necessary.
|
static InputStream |
prepareInputStream(URL url,
boolean acceptAnyCertificate)
Prepare url for authentication and ssl if necessary and returns the input stream from the url.
|
static String |
urlPathJoin(String first,
String second)
Joins two parts of a URL together to ensure there is a / in between the strings but ensuring there is not a "//".
|
public static URLConnection prepareForAuthentication(URLConnection connection)
connection - the connection to be preparedpublic static String decode(String url)
url - The URL to decode, may be null.null if the input was null.public static URLConnection prepareForSSL(URLConnection connection)
connection - the connection to be preparedpublic static InputStream prepareInputStream(URL url, boolean acceptAnyCertificate) throws IOException
url - url to prepareacceptAnyCertificate - true if the certicate check should be skippedIOException - re-thrownCopyright © 2011–2014 Red Hat. All rights reserved.