|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfacebook4j.internal.http.HttpResponse
public abstract class HttpResponse
A data class representing HTTP Response
| Field Summary | |
|---|---|
protected HttpClientConfiguration |
CONF
|
protected java.io.InputStream |
is
|
private JSONObject |
json
|
private JSONArray |
jsonArray
|
private static Logger |
logger
|
protected java.lang.String |
responseAsString
|
protected int |
statusCode
|
private boolean |
streamConsumed
|
| Constructor Summary | |
|---|---|
HttpResponse()
|
|
HttpResponse(HttpClientConfiguration conf)
|
|
| Method Summary | |
|---|---|
JSONArray |
asJSONArray()
Returns the response body as facebook4j.internal.org.json.JSONArray. Disconnects the internal HttpURLConnection silently. |
JSONObject |
asJSONObject()
Returns the response body as facebook4j.internal.org.json.JSONObject. Disconnects the internal HttpURLConnection silently. |
java.io.Reader |
asReader()
|
java.io.InputStream |
asStream()
Returns the response stream. This method cannot be called after calling asString() or asDcoument() It is suggested to call disconnect() after consuming the stream. |
java.lang.String |
asString()
Returns the response body as string. Disconnects the internal HttpURLConnection silently. |
abstract void |
disconnect()
|
private void |
disconnectForcibly()
|
abstract java.lang.String |
getResponseHeader(java.lang.String name)
|
abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getResponseHeaderFields()
|
int |
getStatusCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final Logger logger
protected final HttpClientConfiguration CONF
protected int statusCode
protected java.lang.String responseAsString
protected java.io.InputStream is
private boolean streamConsumed
private JSONObject json
private JSONArray jsonArray
| Constructor Detail |
|---|
HttpResponse()
public HttpResponse(HttpClientConfiguration conf)
| Method Detail |
|---|
public int getStatusCode()
public abstract java.lang.String getResponseHeader(java.lang.String name)
public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResponseHeaderFields()
public java.io.InputStream asStream()
FacebookExceptiondisconnect()
public java.lang.String asString()
throws FacebookException
FacebookException
public JSONObject asJSONObject()
throws FacebookException
FacebookException
public JSONArray asJSONArray()
throws FacebookException
FacebookExceptionpublic java.io.Reader asReader()
private void disconnectForcibly()
public abstract void disconnect()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||