de.netseeker.ejoe.http
Class HttpResponse
java.lang.Object
de.netseeker.ejoe.http.HttpRequest
de.netseeker.ejoe.http.HttpResponse
public class HttpResponse
- extends HttpRequest
A simple container encapsulating a HTTP Response.
- Since:
- 0.3.9.1
- Author:
- netseeker
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 |
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
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 headerstatus
- 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 headercontentType
- a valid mime typestatus
- a valid HTTP status code
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.