public abstract class AbstractStreamProvider extends Object implements StreamProvider
Modifier and Type | Field and Description |
---|---|
protected static TrustManager[] |
INSECURE_TRUST_MANAGERS |
protected static StringManager |
sm |
Constructor and Description |
---|
AbstractStreamProvider() |
Modifier and Type | Method and Description |
---|---|
protected static TrustManager[] |
configureCaCert(String caCertFile) |
protected abstract SSLSocketFactory |
getSocketFactory() |
URLConnection |
openConnection(String url,
Map<String,String> headers,
int connectTimeout,
int readTimeout)
Open URL connection to the specified URL.
|
InputStream |
openStream(String url,
Map<String,String> headers,
int connectTimeout,
int readTimeout)
Open stream to the specified URL.
|
protected static final StringManager sm
protected static final TrustManager[] INSECURE_TRUST_MANAGERS
protected abstract SSLSocketFactory getSocketFactory()
public URLConnection openConnection(String url, Map<String,String> headers, int connectTimeout, int readTimeout) throws IOException
url
- the urlheaders
- the headers mapconnectTimeout
- connection timeout in msreadTimeout
- read timeout in msIOException
- when an error occurspublic InputStream openStream(String url, Map<String,String> headers, int connectTimeout, int readTimeout) throws IOException
StreamProvider
openStream
in interface StreamProvider
url
- the urlheaders
- the headers mapconnectTimeout
- connection timeout in msreadTimeout
- read timeout in msIOException
- when an error occursprotected static TrustManager[] configureCaCert(String caCertFile) throws Exception
Exception
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.