|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.http.Response
public class Response
A data class representing HTTP Response
| Constructor Summary | |
|---|---|
Response(java.net.HttpURLConnection con)
|
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
asDocument()
Returns the response body as org.w3c.dom.Document. Disconnects the internal HttpURLConnection silently. |
twitter4j.org.json.JSONArray |
asJSONArray()
Returns the response body as twitter4j.org.json.JSONArray. Disconnects the internal HttpURLConnection silently. |
twitter4j.org.json.JSONObject |
asJSONObject()
Returns the response body as twitter4j.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. |
void |
disconnect()
|
java.lang.String |
getResponseHeader(java.lang.String name)
|
int |
getStatusCode()
|
java.lang.String |
toString()
|
static java.lang.String |
unescape(java.lang.String original)
Unescape UTF-8 escaped characters to string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Response(java.net.HttpURLConnection con)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public int getStatusCode()
public java.lang.String getResponseHeader(java.lang.String name)
public java.io.InputStream asStream()
TwitterExceptiondisconnect()
public java.lang.String asString()
throws TwitterException
TwitterException
public org.w3c.dom.Document asDocument()
throws TwitterException
TwitterException
public twitter4j.org.json.JSONObject asJSONObject()
throws TwitterException
TwitterException
public twitter4j.org.json.JSONArray asJSONArray()
throws TwitterException
TwitterExceptionpublic java.io.InputStreamReader asReader()
public void disconnect()
public static java.lang.String unescape(java.lang.String original)
original - The string to be unescaped.
public 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 | |||||||||