|
||||||||||
| 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
| Constructor Summary | |
|---|---|
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. |
Reader |
asReader()
|
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. |
String |
asString()
Returns the response body as string. Disconnects the internal HttpURLConnection silently. |
abstract void |
disconnect()
|
abstract String |
getResponseHeader(String name)
|
abstract Map<String,List<String>> |
getResponseHeaderFields()
|
int |
getStatusCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpResponse(HttpClientConfiguration conf)
| Method Detail |
|---|
public int getStatusCode()
public abstract String getResponseHeader(String name)
public abstract Map<String,List<String>> getResponseHeaderFields()
public InputStream asStream()
FacebookExceptiondisconnect()
public String asString()
throws FacebookException
FacebookException
public JSONObject asJSONObject()
throws FacebookException
FacebookException
public JSONArray asJSONArray()
throws FacebookException
FacebookExceptionpublic Reader asReader()
public abstract void disconnect()
throws IOException
IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||