twitter4j.http
Class Response

java.lang.Object
  extended by twitter4j.http.Response
All Implemented Interfaces:
java.io.Serializable

public class Response
extends java.lang.Object
implements java.io.Serializable

A data class representing HTTP Response

Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
Serialized Form

Field Summary
(package private) static javax.xml.parsers.DocumentBuilder builder
           
private  java.net.HttpURLConnection con
           
private  java.io.InputStream is
           
private  org.w3c.dom.Document response
           
private  java.lang.String responseString
           
private  org.xml.sax.SAXException saxe
           
private static long serialVersionUID
           
private  int statusCode
           
 
Constructor Summary
Response(java.net.HttpURLConnection con)
           
 
Method Summary
 org.w3c.dom.Document asDocument()
           
 twitter4j.org.json.JSONObject asJSONObject()
           
 java.io.InputStreamReader asReader()
           
 java.io.InputStream asStream()
           
 java.lang.String asString()
           
 java.lang.String getResponseHeader(java.lang.String name)
           
 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

builder

static javax.xml.parsers.DocumentBuilder builder

statusCode

private int statusCode

response

private org.w3c.dom.Document response

responseString

private java.lang.String responseString

is

private java.io.InputStream is

saxe

private org.xml.sax.SAXException saxe

con

private java.net.HttpURLConnection con

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Response

public Response(java.net.HttpURLConnection con)
         throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getStatusCode

public int getStatusCode()

getResponseHeader

public java.lang.String getResponseHeader(java.lang.String name)

asString

public java.lang.String asString()

asStream

public java.io.InputStream asStream()

asDocument

public org.w3c.dom.Document asDocument()
                                throws TwitterException
Throws:
TwitterException

asJSONObject

public twitter4j.org.json.JSONObject asJSONObject()
                                           throws TwitterException
Throws:
TwitterException

asReader

public java.io.InputStreamReader asReader()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object