facebook4j
Class BatchResponseImpl

java.lang.Object
  extended by facebook4j.internal.http.HttpResponse
      extended by facebook4j.BatchResponseImpl
All Implemented Interfaces:
BatchResponse, Serializable

public class BatchResponseImpl
extends facebook4j.internal.http.HttpResponse
implements BatchResponse, Serializable

Since:
Facebook4J 2.1.0
See Also:
Serialized Form

Method Summary
 facebook4j.internal.org.json.JSONArray asJSONArray()
          Returns the response body as facebook4j.internal.org.json.JSONArray.
Disconnects the internal HttpURLConnection silently.
 facebook4j.internal.org.json.JSONObject asJSONObject()
          Returns the response body as facebook4j.internal.org.json.JSONObject.
Disconnects the internal HttpURLConnection silently.
 Reader asReader()
           
 ResponseList<facebook4j.internal.org.json.JSONObject> asResponseList()
           
 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.
 void disconnect()
           
 String getResponseHeader(String name)
           
 Map<String,List<String>> getResponseHeaderFields()
           
 String toString()
           
 
Methods inherited from class facebook4j.internal.http.HttpResponse
getStatusCode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface facebook4j.BatchResponse
getStatusCode
 

Method Detail

getResponseHeader

public String getResponseHeader(String name)
Specified by:
getResponseHeader in interface BatchResponse
Specified by:
getResponseHeader in class facebook4j.internal.http.HttpResponse

getResponseHeaderFields

public Map<String,List<String>> getResponseHeaderFields()
Specified by:
getResponseHeaderFields in interface BatchResponse
Specified by:
getResponseHeaderFields in class facebook4j.internal.http.HttpResponse

asString

public String asString()
                throws FacebookException
Description copied from class: facebook4j.internal.http.HttpResponse
Returns the response body as string.
Disconnects the internal HttpURLConnection silently.

Specified by:
asString in interface BatchResponse
Overrides:
asString in class facebook4j.internal.http.HttpResponse
Returns:
response body
Throws:
FacebookException

asJSONObject

public facebook4j.internal.org.json.JSONObject asJSONObject()
                                                     throws FacebookException
Description copied from class: facebook4j.internal.http.HttpResponse
Returns the response body as facebook4j.internal.org.json.JSONObject.
Disconnects the internal HttpURLConnection silently.

Specified by:
asJSONObject in interface BatchResponse
Overrides:
asJSONObject in class facebook4j.internal.http.HttpResponse
Returns:
response body as facebook4j.internal.org.json.JSONObject
Throws:
FacebookException

asResponseList

public ResponseList<facebook4j.internal.org.json.JSONObject> asResponseList()
                                                                     throws FacebookException
Specified by:
asResponseList in interface BatchResponse
Throws:
FacebookException

asJSONArray

public facebook4j.internal.org.json.JSONArray asJSONArray()
                                                   throws FacebookException
Description copied from class: facebook4j.internal.http.HttpResponse
Returns the response body as facebook4j.internal.org.json.JSONArray.
Disconnects the internal HttpURLConnection silently.

Specified by:
asJSONArray in interface BatchResponse
Overrides:
asJSONArray in class facebook4j.internal.http.HttpResponse
Returns:
response body as facebook4j.internal.org.json.JSONArray
Throws:
FacebookException

disconnect

public void disconnect()
                throws IOException
Specified by:
disconnect in class facebook4j.internal.http.HttpResponse
Throws:
IOException

asStream

public InputStream asStream()
Description copied from class: facebook4j.internal.http.HttpResponse
Returns the response stream.
This method cannot be called after calling asString() or asDcoument()
It is suggested to call disconnect() after consuming the stream.

Disconnects the internal HttpURLConnection silently.

Overrides:
asStream in class facebook4j.internal.http.HttpResponse
Returns:
response body stream
See Also:
HttpResponse.disconnect()

asReader

public Reader asReader()
Overrides:
asReader in class facebook4j.internal.http.HttpResponse

toString

public String toString()
Overrides:
toString in class facebook4j.internal.http.HttpResponse


Copyright © 2019. All rights reserved.