public class URLUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decode(java.lang.String url)
Decodes the specified (portion of a) URL.
|
static java.net.URLConnection |
prepareForAuthentication(java.net.URLConnection connection)
Prepares an url connection for authentication if necessary.
|
static java.net.URLConnection |
prepareForSSL(java.net.URLConnection connection)
Prepares an url connection for authentication if necessary.
|
static java.io.InputStream |
prepareInputStream(java.net.URL url,
boolean acceptAnyCertificate)
Prepare url for authentication and ssl if necessary and returns the input stream from the url.
|
public static java.net.URLConnection prepareForAuthentication(java.net.URLConnection connection)
connection
- the connection to be preparedpublic static java.lang.String decode(java.lang.String url)
url
- The URL to decode, may be null
.null
if the input was null
.public static java.net.URLConnection prepareForSSL(java.net.URLConnection connection)
connection
- the connection to be preparedpublic static java.io.InputStream prepareInputStream(java.net.URL url, boolean acceptAnyCertificate) throws java.io.IOException
url
- url to prepareacceptAnyCertificate
- true if the certicate check should be skippedjava.io.IOException
- re-thrownCopyright © 2014 Red Hat. All Rights Reserved.