public static class HttpUtils.HTTPResponseResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) org.apache.http.HttpEntity |
entity
The httpclient entity.
|
(package private) org.apache.http.impl.client.DefaultHttpClient |
httpClient
The httpclient.
|
Constructor and Description |
---|
HTTPResponseResult(org.apache.http.HttpEntity entity,
org.apache.http.impl.client.DefaultHttpClient httpClient)
Creates HTTPResponseResult.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getContent()
Returns a content stream of the entity.
|
long |
getContentLength()
Tells the length of the content, if known.
|
java.lang.String |
getContentString()
Returns a content string of the entity.
|
java.lang.String[] |
getCredentials()
Get the credentials used by the request.
|
org.apache.http.HttpEntity entity
org.apache.http.impl.client.DefaultHttpClient httpClient
HTTPResponseResult(org.apache.http.HttpEntity entity, org.apache.http.impl.client.DefaultHttpClient httpClient)
entity
- the httpclient entity.httpClient
- the httpclient.public long getContentLength()
Long.MAX_VALUE
,
a negative number is returned.public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException
java.io.IOException
- if the stream could not be createdjava.lang.IllegalStateException
- if content stream cannot be created.public java.lang.String getContentString() throws java.io.IOException
java.io.IOException
- if the stream could not be createdpublic java.lang.String[] getCredentials()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.