public class Http11BlockLoader extends Object implements BlockLoader
Constructor and Description |
---|
Http11BlockLoader() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBlock(String url,
long offset,
int length)
Fetch a range of bytes from a particular URL.
|
int |
getConnectionTimeoutMS() |
int |
getMaxHostConnections() |
int |
getMaxTotalConnections() |
int |
getSocketTimeoutMS() |
void |
setConnectionTimeoutMS(int connectionTimeoutMS) |
void |
setMaxHostConnections(int maxHostConnections) |
void |
setMaxTotalConnections(int maxTotalConnections) |
void |
setProxyHostPort(String hostPort) |
void |
setSocketTimeoutMS(int socketTimeoutMS) |
public byte[] getBlock(String url, long offset, int length) throws IOException
getBlock
in interface BlockLoader
url
- String URL to fetchoffset
- byte start offset of the desired rangelength
- number of octets to fetchIOException
- on HTTP and Socket failures, as well as Timeoutspublic void setProxyHostPort(String hostPort)
hostPort
- to proxy requests through - ex. "localhost:3128"public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections
- the HttpConnectionManagerParams configpublic int getMaxTotalConnections()
public void setMaxHostConnections(int maxHostConnections)
maxHostConnections
- the HttpConnectionManagerParams configpublic int getMaxHostConnections()
public int getConnectionTimeoutMS()
public void setConnectionTimeoutMS(int connectionTimeoutMS)
connectionTimeoutMS
- the connectionTimeoutMS to setpublic int getSocketTimeoutMS()
public void setSocketTimeoutMS(int socketTimeoutMS)
socketTimeoutMS
- the socketTimeoutMS to setCopyright © 2005–2015 IIPC. All rights reserved.