public class URLUtils extends Object
Modifier and Type | Method and Description |
---|---|
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 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–2014 OPS4J - Open Participation Software for Java. All rights reserved.