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.
|
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 © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.