@ThreadSafe public class DefaultResourceRetriever extends AbstractRestrictedResourceRetriever implements RestrictedResourceRetriever
| Constructor and Description |
|---|
DefaultResourceRetriever()
Creates a new resource retriever.
|
DefaultResourceRetriever(int connectTimeout,
int readTimeout)
Creates a new resource retriever.
|
DefaultResourceRetriever(int connectTimeout,
int readTimeout,
int sizeLimit)
Creates a new resource retriever.
|
| Modifier and Type | Method and Description |
|---|---|
Resource |
retrieveResource(URL url)
Retrieves the resource from the specified HTTP(S) URL.
|
getConnectTimeout, getReadTimeout, getSizeLimit, setConnectTimeout, setReadTimeout, setSizeLimitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnectTimeout, getReadTimeout, getSizeLimit, setConnectTimeout, setReadTimeout, setSizeLimitpublic DefaultResourceRetriever()
public DefaultResourceRetriever(int connectTimeout, int readTimeout)
connectTimeout - The HTTP connects timeout, in milliseconds,
zero for infinite. Must not be negative.readTimeout - The HTTP read timeout, in milliseconds, zero
for infinite. Must not be negative.public DefaultResourceRetriever(int connectTimeout, int readTimeout, int sizeLimit)
connectTimeout - The HTTP connects timeout, in milliseconds,
zero for infinite. Must not be negative.readTimeout - The HTTP read timeout, in milliseconds, zero
for infinite. Must not be negative.sizeLimit - The HTTP entity size limit, in bytes, zero for
infinite. Must not be negative.public Resource retrieveResource(URL url) throws IOException
ResourceRetrieverretrieveResource in interface ResourceRetrieverurl - The URL of the resource. Its scheme must be HTTP or
HTTPS. Must not be null.IOException - If the HTTP connection to the specified URL
failed or the resource couldn't be retrieved.Copyright © 2017 Connect2id Ltd.. All rights reserved.