com.atlassian.confluence.util.http
Interface HttpResponse

All Known Implementing Classes:
HttpClientHttpResponse

public interface HttpResponse


Method Summary
 void finish()
           
 java.lang.String getCharset()
          Returns the charset of the response.
 java.lang.String getContentType()
          Returns the type of the response content.
 java.lang.String[] getHeaders(java.lang.String name)
          Retrieves all HTTP response headers with the specified name and returns an array of their values.
 java.lang.String getMIMEType()
          Returns the MIME type of the response.
 java.io.InputStream getResponse()
           
 java.net.URI getResponseURI()
          Returns the URI of the site that the response came from.
 int getStatusCode()
           
 java.lang.String getStatusMessage()
           
 boolean isCached()
           
 boolean isFailed()
           
 boolean isNotFound()
           
 boolean isNotPermitted()
           
 

Method Detail

isCached

boolean isCached()

isFailed

boolean isFailed()

isNotFound

boolean isNotFound()

isNotPermitted

boolean isNotPermitted()

getResponse

java.io.InputStream getResponse()
                                throws java.io.IOException
Throws:
java.io.IOException

getResponseURI

java.net.URI getResponseURI()
Returns the URI of the site that the response came from. The URI will be absolute if the host configuration has been set and relative otherwise.

Returns:
the URI of the response
Since:
5.1.5

getCharset

java.lang.String getCharset()
Returns the charset of the response.

Returns:
the charset of the response, or null.
Since:
5.1.5

getMIMEType

java.lang.String getMIMEType()
Returns the MIME type of the response.

Returns:
the MIME type of the response.
Since:
5.1.5

getContentType

java.lang.String getContentType()
Returns the type of the response content.

Returns:
a string containing the MIME type and the charset of the response.
See Also:
getCharset(), getMIMEType()

getHeaders

java.lang.String[] getHeaders(java.lang.String name)
Retrieves all HTTP response headers with the specified name and returns an array of their values.

Parameters:
name - the HTTP response header to retreive. Must not be null, or an IllegalArgumentException will be thrown.
Returns:
an array of the header values found on the response, or an empty array. Must not return null.
Throws:
java.lang.IllegalArgumentException - if the name parameter is null
Since:
2.10

getStatusMessage

java.lang.String getStatusMessage()

getStatusCode

int getStatusCode()

finish

void finish()


Copyright © 2003-2014 Atlassian. All Rights Reserved.