|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.internal.http.HttpResponse
public abstract class HttpResponse
A data class representing HTTP Response
| Constructor Summary | |
|---|---|
HttpResponse()
|
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
asDocument()
Returns the response body as org.w3c.dom.Document. Disconnects the internal HttpURLConnection silently. |
JSONArray |
asJSONArray()
Returns the response body as twitter4j.internal.org.json.JSONArray. Disconnects the internal HttpURLConnection silently. |
JSONObject |
asJSONObject()
Returns the response body as twitter4j.internal.org.json.JSONObject. Disconnects the internal HttpURLConnection silently. |
java.io.InputStreamReader |
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()
|
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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpResponse()
| Method Detail |
|---|
public final 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 final java.io.InputStream asStream()
TwitterExceptiondisconnect()
public final java.lang.String asString()
throws TwitterException
TwitterException
public final org.w3c.dom.Document asDocument()
throws TwitterException
TwitterException
public final JSONObject asJSONObject()
throws TwitterException
TwitterException
public final JSONArray asJSONArray()
throws TwitterException
TwitterExceptionpublic final java.io.InputStreamReader asReader()
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 | |||||||||