public class HttpResourceExchange extends Object implements ResourceExchange
Modifier and Type | Class and Description |
---|---|
static class |
HttpResourceExchange.Properties
Exchange properties
|
Constructor and Description |
---|
HttpResourceExchange()
Default constructor: setups a default http client object and uses system
proxy information if available
|
HttpResourceExchange(HashMap<String,Object> connectionProperties)
Constructor using connection properties (at the moment, it supports only
unauthenticated proxies).
|
Modifier and Type | Method and Description |
---|---|
Resource<InputStream> |
get(URI uri)
Gets the resource pointed by an URL into file
|
ResourceInfo |
info(URI uri)
Gets the resource information pointed by an URL into file
|
void |
release()
Releases any open resources used by the exchange
|
public HttpResourceExchange()
public HttpResourceExchange(HashMap<String,Object> connectionProperties)
connectionProperties
- A hash map of connection properties to use to
setup the connection (ex.: proxy)public ResourceInfo info(URI uri) throws ResourceExchangeException
ResourceExchange
info
in interface ResourceExchange
uri
- the resource location/addressResourceExchangeException
- if unable to obtain the resource. Check the root cause for details.public Resource<InputStream> get(URI uri) throws ResourceExchangeException
ResourceExchange
get
in interface ResourceExchange
uri
- the resource location/addressResourceExchangeException
- if unable to obtain the resource. Check the root cause for details.public void release()
ResourceExchange
release
in interface ResourceExchange
This documentation was released into the public domain.