de.netseeker.ejoe.http
Class HttpResponse

java.lang.Object
  extended by de.netseeker.ejoe.http.HttpRequest
      extended by de.netseeker.ejoe.http.HttpResponse

public class HttpResponse
extends HttpRequest

A simple container encapsulating a HTTP Response.

Since:
0.3.9.1
Author:
netseeker

Field Summary
static java.lang.String HTTP_BAD_REQUEST
           
static java.lang.String HTTP_DATE_FORMAT
           
static java.lang.String HTTP_INTERNAL_SERVER_ERROR
           
static java.lang.String HTTP_LENGTH_REQUIRED
           
static java.lang.String HTTP_METHOD_NOT_ALLOWED
           
static java.lang.String HTTP_NOT_FOUND
           
static java.lang.String HTTP_OK
           
static java.lang.String HTTP_VERSION_NOT_SUPPORTED
           
 
Fields inherited from class de.netseeker.ejoe.http.HttpRequest
_header, _out, CHARSET, HTTP_GET, HTTP_HEAD, HTTP_POST, LINE_SEP
 
Constructor Summary
HttpResponse(ConnectionHeader header, java.lang.String status)
          Creates a new HTTP response using the given connection header and the given HTTP status code string
HttpResponse(ConnectionHeader header, java.lang.String contentType, java.lang.String status)
          Creates a new HTTP response using the given connection header, the given content (mime) type and the given HTTP status code string
 
Method Summary
 java.lang.String getStatus()
           
protected  java.lang.String toHeaderString()
          Transforms only the contained HTTP header into a string representation
 
Methods inherited from class de.netseeker.ejoe.http.HttpRequest
addData, addData, addData, addData, addData, getContentType, getHost, getMethod, getOutputStream, reset, toByteBuffer, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTTP_DATE_FORMAT

public static final java.lang.String HTTP_DATE_FORMAT
See Also:
Constant Field Values

HTTP_OK

public static final java.lang.String HTTP_OK
See Also:
Constant Field Values

HTTP_BAD_REQUEST

public static final java.lang.String HTTP_BAD_REQUEST
See Also:
Constant Field Values

HTTP_NOT_FOUND

public static final java.lang.String HTTP_NOT_FOUND
See Also:
Constant Field Values

HTTP_METHOD_NOT_ALLOWED

public static final java.lang.String HTTP_METHOD_NOT_ALLOWED
See Also:
Constant Field Values

HTTP_LENGTH_REQUIRED

public static final java.lang.String HTTP_LENGTH_REQUIRED
See Also:
Constant Field Values

HTTP_INTERNAL_SERVER_ERROR

public static final java.lang.String HTTP_INTERNAL_SERVER_ERROR
See Also:
Constant Field Values

HTTP_VERSION_NOT_SUPPORTED

public static final java.lang.String HTTP_VERSION_NOT_SUPPORTED
See Also:
Constant Field Values
Constructor Detail

HttpResponse

public HttpResponse(ConnectionHeader header,
                    java.lang.String status)
Creates a new HTTP response using the given connection header and the given HTTP status code string

Parameters:
header - a valid connection header
status - a valid HTTP status code

HttpResponse

public HttpResponse(ConnectionHeader header,
                    java.lang.String contentType,
                    java.lang.String status)
Creates a new HTTP response using the given connection header, the given content (mime) type and the given HTTP status code string

Parameters:
header - a valid connection header
contentType - a valid mime type
status - a valid HTTP status code
Method Detail

toHeaderString

protected java.lang.String toHeaderString()
Description copied from class: HttpRequest
Transforms only the contained HTTP header into a string representation

Overrides:
toHeaderString in class HttpRequest
Returns:
a string representation of this HTTP header

getStatus

public java.lang.String getStatus()
Returns:
the HTTP status


Copyright © 2005-2007 netseeker. All Rights Reserved.