com.atlassian.sal.core.net
Class HttpClientResponse

java.lang.Object
  extended by com.atlassian.sal.core.net.HttpClientResponse
All Implemented Interfaces:
Response

public class HttpClientResponse
extends Object
implements Response


Constructor Summary
HttpClientResponse(org.apache.commons.httpclient.HttpMethod method)
           
 
Method Summary
<T> T
getEntity(Class<T> entityClass)
           
 String getHeader(String name)
           
 Map<String,String> getHeaders()
           
 InputStream getResponseBodyAsStream()
           
 String getResponseBodyAsString()
           
 int getStatusCode()
           
 String getStatusText()
           
 boolean isSuccessful()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientResponse

public HttpClientResponse(org.apache.commons.httpclient.HttpMethod method)
Method Detail

getResponseBodyAsString

public String getResponseBodyAsString()
                               throws ResponseException
Specified by:
getResponseBodyAsString in interface Response
Throws:
ResponseException

getResponseBodyAsStream

public InputStream getResponseBodyAsStream()
                                    throws ResponseException
Specified by:
getResponseBodyAsStream in interface Response
Throws:
ResponseException

getEntity

public <T> T getEntity(Class<T> entityClass)
            throws ResponseException
Specified by:
getEntity in interface Response
Throws:
ResponseException

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface Response

getStatusText

public String getStatusText()
Specified by:
getStatusText in interface Response

isSuccessful

public boolean isSuccessful()
Specified by:
isSuccessful in interface Response

getHeader

public String getHeader(String name)
Specified by:
getHeader in interface Response

getHeaders

public Map<String,String> getHeaders()
Specified by:
getHeaders in interface Response


Copyright © 2010 Atlassian. All Rights Reserved.