Spring for Android

org.springframework.http.client
Class AbstractClientHttpResponse

java.lang.Object
  extended by org.springframework.http.client.AbstractClientHttpResponse
All Implemented Interfaces:
ClientHttpResponse, HttpInputMessage, HttpMessage

public abstract class AbstractClientHttpResponse
extends java.lang.Object
implements ClientHttpResponse

Abstract base for ClientHttpResponse.

Since:
1.0
Author:
Roy Clarkson

Constructor Summary
AbstractClientHttpResponse()
           
 
Method Summary
 void close()
          Closes this response, freeing any resources created.
protected abstract  void closeInternal()
          Abstract template method that closes the response.
 java.io.InputStream getBody()
          Return the body of the message as an input stream.
protected abstract  java.io.InputStream getBodyInternal()
          Abstract template method that returns the body.
 HttpStatus getStatusCode()
          Return the HTTP status code of the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.http.client.ClientHttpResponse
getRawStatusCode, getStatusText
 
Methods inherited from interface org.springframework.http.HttpMessage
getHeaders
 

Constructor Detail

AbstractClientHttpResponse

public AbstractClientHttpResponse()
Method Detail

getStatusCode

public HttpStatus getStatusCode()
                         throws java.io.IOException
Description copied from interface: ClientHttpResponse
Return the HTTP status code of the response.

Specified by:
getStatusCode in interface ClientHttpResponse
Returns:
the HTTP status as an HttpStatus enum value
Throws:
java.io.IOException - in case of I/O errors

getBody

public java.io.InputStream getBody()
                            throws java.io.IOException
Description copied from interface: HttpInputMessage
Return the body of the message as an input stream.

Specified by:
getBody in interface HttpInputMessage
Returns:
the input stream body
Throws:
java.io.IOException - in case of I/O Errors

close

public void close()
Description copied from interface: ClientHttpResponse
Closes this response, freeing any resources created.

Specified by:
close in interface ClientHttpResponse

getBodyInternal

protected abstract java.io.InputStream getBodyInternal()
                                                throws java.io.IOException
Abstract template method that returns the body.

Returns:
the body input stream
Throws:
java.io.IOException

closeInternal

protected abstract void closeInternal()
Abstract template method that closes the response.


Spring for Android