|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.any23.http.DefaultHTTPClient
public class DefaultHTTPClient
Opens an InputStream on an HTTP URI. Is configured
with sane values for timeouts, default headers and so on.
| Constructor Summary | |
|---|---|
DefaultHTTPClient()
|
|
| Method Summary | |
|---|---|
void |
close()
Shuts down the connection manager. |
String |
getActualDocumentURI()
Returns the actual URI from which the document was fetched. |
protected int |
getConnectionTimeout()
|
long |
getContentLength()
|
String |
getContentType()
The value of the Content-Type header reported by the server. |
protected int |
getSoTimeout()
|
void |
init(HTTPClientConfiguration configuration)
Initializes the HTTP client. |
InputStream |
openInputStream(String uri)
Opens an InputStream from a given URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultHTTPClient()
| Method Detail |
|---|
public void init(HTTPClientConfiguration configuration)
HTTPClient
init in interface HTTPClientconfiguration - configuration for the HTTP Client.
public InputStream openInputStream(String uri)
throws IOException
InputStream from a given URI.
It follows redirects.
openInputStream in interface HTTPClienturi - to be opened
InputStream
IOExceptionpublic void close()
close in interface HTTPClientpublic long getContentLength()
getContentLength in interface HTTPClientpublic String getActualDocumentURI()
HTTPClient
getActualDocumentURI in interface HTTPClientpublic String getContentType()
HTTPClient
getContentType in interface HTTPClientprotected int getConnectionTimeout()
protected int getSoTimeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||