|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 HTTPClient
configuration
- configuration for the HTTP Client.public InputStream openInputStream(String uri) throws IOException
InputStream
from a given URI.
It follows redirects.
openInputStream
in interface HTTPClient
uri
- to be opened
InputStream
IOException
public void close()
close
in interface HTTPClient
public long getContentLength()
getContentLength
in interface HTTPClient
public String getActualDocumentURI()
HTTPClient
getActualDocumentURI
in interface HTTPClient
public String getContentType()
HTTPClient
getContentType
in interface HTTPClient
protected int getConnectionTimeout()
protected int getSoTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |