Logo Search packages:      
Sourcecode: jetty version File versions  Download package

org::mortbay::http::HttpResponse Class Reference

Inheritance diagram for org::mortbay::http::HttpResponse:


List of all members.

Detailed Description

HTTP Response. This class manages the headers, trailers and content streams of a HTTP response. It can be used for receiving or generating requests.

This class is not synchronized. It should be explicitly synchronized if it is used by multiple threads.

See also:
HttpResponse.java,v 1.62 2007/07/02 01:21:58 gregwilkins Exp
Greg Wilkins (gregw)

Definition at line 47 of file HttpResponse.java.

Public Member Functions

void addDateField (String name, long date)
void addDateField (String name, Date date)
void addField (String name, String value) throws IllegalStateException
void addIntField (String name, int value)
void addSetCookie (Cookie cookie)
void addSetCookie (String name, String value)
void commit () throws IOException
void completing ()
boolean containsField (String name)
void destroy ()
Object getAttribute (String name)
Enumeration getAttributeNames ()
String getCharacterEncoding ()
int getContentLength ()
String getContentType ()
long getDateField (String name)
int getDotVersion ()
String getField (String name)
Enumeration getFieldNames ()
Enumeration getFieldValues (String name, String separators)
Enumeration getFieldValues (String name)
HttpFields getHeader ()
HttpConnection getHttpConnection ()
HttpContext getHttpContext ()
HttpRequest getHttpRequest ()
InputStream getInputStream ()
int getIntField (String name)
String getMimeType ()
OutputStream getOutputStream ()
String getReason ()
HttpRequest getRequest ()
int getState ()
int getStatus ()
String getVersion ()
Object getWrapper ()
 HttpResponse (HttpConnection connection)
 HttpResponse ()
boolean isCommitted ()
boolean isDirty ()
void readHeader (HttpInputStream in) throws IOException
void removeAttribute (String name)
String removeField (String name) throws IllegalStateException
void reset ()
void sendError (int code) throws IOException
void sendError (int code, String message) throws IOException
void sendRedirect (String location) throws IOException
Object setAttribute (String name, Object attribute)
void setCharacterEncoding (String encoding, boolean setField)
void setContentLength (int len)
void setContentType (String contentType)
void setDateField (String name, long date)
void setDateField (String name, Date date)
void setField (String name, List value)
String setField (String name, String value)
void setHttpContext (HttpContext context)
void setIntField (String name, int value)
void setReason (String reason)
int setState (int state)
void setStatus (int code, String message)
void setStatus (int status)
void setVersion (String version)
void setWrapper (Object wrapper)
synchronized String toString ()
void updateMimeType ()
void writeHeader (Writer writer) throws IOException

Static Public Attributes

static final int __100_Continue = 100
static final int __101_Switching_Protocols = 101
static final int __102_Processing = 102
static final int __200_OK = 200
static final int __201_Created = 201
static final int __202_Accepted = 202
static final int __203_Non_Authoritative_Information = 203
static final int __204_No_Content = 204
static final int __205_Reset_Content = 205
static final int __206_Partial_Content = 206
static final int __207_Multi_Status = 207
static final int __300_Multiple_Choices = 300
static final int __301_Moved_Permanently = 301
static final int __302_Found = 302
static final int __302_Moved_Temporarily = 302
static final int __303_See_Other = 303
static final int __304_Not_Modified = 304
static final int __305_Use_Proxy = 305
static final int __400_Bad_Request = 400
static final int __401_Unauthorized = 401
static final int __402_Payment_Required = 402
static final int __403_Forbidden = 403
static final int __404_Not_Found = 404
static final int __405_Method_Not_Allowed = 405
static final int __406_Not_Acceptable = 406
static final int __407_Proxy_Authentication_Required = 407
static final int __408_Request_Timeout = 408
static final int __409_Conflict = 409
static final int __410_Gone = 410
static final int __411_Length_Required = 411
static final int __412_Precondition_Failed = 412
static final int __413_Request_Entity_Too_Large = 413
static final int __414_Request_URI_Too_Large = 414
static final int __415_Unsupported_Media_Type = 415
static final int __416_Requested_Range_Not_Satisfiable = 416
static final int __417_Expectation_Failed = 417
static final int __422_Unprocessable_Entity = 422
static final int __423_Locked = 423
static final int __424_Failed_Dependency = 424
static final int __500_Internal_Server_Error = 500
static final int __501_Not_Implemented = 501
static final int __502_Bad_Gateway = 502
static final int __503_Service_Unavailable = 503
static final int __504_Gateway_Timeout = 504
static final int __505_HTTP_Version_Not_Supported = 505
static final int __507_Insufficient_Storage = 507
static final String __HTTP_0_9 = "HTTP/0.9"
static final String __HTTP_1_0 = "HTTP/1.0"
static final String __HTTP_1_1 = "HTTP/1.1"
static final String __HTTP_1_X = "HTTP/1."
static final int __MSG_BAD = 1
static final int __MSG_EDITABLE = 0
static final int __MSG_RECEIVED = 2
static final int __MSG_SENDING = 3
static final int __MSG_SENT = 4
static final String __SCHEME = "http"
static final String __SSL_SCHEME = "https"
static final String[] __state
static final HashMap __statusMsg = new HashMap()

Protected Attributes

Map _attributes
String _characterEncoding
HttpConnection _connection
int _dotVersion
HttpFields _header = new HttpFields()
String _mimeType
int _state = __MSG_EDITABLE
String _version
Object _wrapper

Package Functions

void recycle (HttpConnection connection)

Static Package Functions

 [static initializer]
 [static initializer]

Static Package Attributes

static byte[] __Continue

Private Attributes

HttpContext _httpContext
String _reason
int _status = __200_OK

Static Private Attributes

static Log log = LogFactory.getLog(HttpResponse.class)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index