org.apache.http.message
Class BasicHttpResponse

java.lang.Object
  extended by org.apache.http.message.AbstractHttpMessage
      extended by org.apache.http.message.BasicHttpResponse
All Implemented Interfaces:
HttpMessage, HttpResponse

public class BasicHttpResponse
extends AbstractHttpMessage
implements HttpResponse

Basic implementation of an HTTP response that can be modified.

Since:
4.0
Version:
$Revision: 385789 $
Author:
Oleg Kalnichevski

Constructor Summary
BasicHttpResponse()
           
BasicHttpResponse(StatusLine statusline)
           
 
Method Summary
 HttpEntity getEntity()
          Returns the response entity of this response as set by
 HttpVersion getHttpVersion()
          Returns the HTTP version this message is compatible with.
 StatusLine getStatusLine()
          Returns the status line that belongs to this response as set by
 void setEntity(HttpEntity entity)
          Associates a response entity with this response.
 void setStatusCode(int code)
          Convenience method that creates and sets a new status line of this response that is initialized with the specified status code.
 void setStatusLine(StatusLine statusline)
          Sets the status line that belongs to this response.
 
Methods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, removeHeader, removeHeaders, setHeader, setParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.HttpMessage
addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, removeHeader, removeHeaders, setHeader, setParams
 

Constructor Detail

BasicHttpResponse

public BasicHttpResponse()

BasicHttpResponse

public BasicHttpResponse(StatusLine statusline)
Method Detail

getHttpVersion

public HttpVersion getHttpVersion()
Description copied from interface: HttpMessage
Returns the HTTP version this message is compatible with.

Specified by:
getHttpVersion in interface HttpMessage

getStatusLine

public StatusLine getStatusLine()
Description copied from interface: HttpResponse
Returns the status line that belongs to this response as set by

Specified by:
getStatusLine in interface HttpResponse

getEntity

public HttpEntity getEntity()
Description copied from interface: HttpResponse
Returns the response entity of this response as set by

Specified by:
getEntity in interface HttpResponse
Returns:
the response entity or null if there is none.

setStatusLine

public void setStatusLine(StatusLine statusline)
Description copied from interface: HttpResponse
Sets the status line that belongs to this response.

Specified by:
setStatusLine in interface HttpResponse
Parameters:
statusline - the status line of this response.

setStatusCode

public void setStatusCode(int code)
Description copied from interface: HttpResponse
Convenience method that creates and sets a new status line of this response that is initialized with the specified status code.

Specified by:
setStatusCode in interface HttpResponse
Parameters:
code - the HTTP status code.
See Also:
HttpStatus

setEntity

public void setEntity(HttpEntity entity)
Description copied from interface: HttpResponse
Associates a response entity with this response.

Specified by:
setEntity in interface HttpResponse
Parameters:
entity - the entity to associate with this response.


Copyright 2005-2005-2006 Apache Software Foundation. All Rights Reserved.