gnu.inet.http
Class Response
public class Response
extends java.lang.Object
An HTTP response.
- Chris Burdess
protected int | code - The HTTP status code of the response.
|
protected int | codeClass - The class of the response.
|
protected Headers | headers - The response headers.
|
protected int | majorVersion - The HTTP major version of the server issuing the response.
|
protected String | message - Human-readable text of the response.
|
protected int | minorVersion - The HTTP minor version of the server issuing the response.
|
Response(int majorVersion, int minorVersion, int code, int codeClass, String message, Headers headers) - Constructs a new response with the specified parameters.
|
int | getCode() - Returns the HTTP status code of the response.
|
int | getCodeClass() - Returns the class of the response.
|
Date | getDateHeader(String name) - Returns the header value for the specified name as a date.
|
String | getHeader(String name) - Returns the header value for the specified name.
|
Headers | getHeaders() - Returns the headers in the response.
|
int | getIntHeader(String name) - Returns the header value for the specified name as an integer.
|
int | getMajorVersion() - Returns the HTTP major version of the server issuing the response.
|
String | getMessage() - Returns the human-readable text of the response.
|
int | getMinorVersion() - Returns the HTTP minor version of the server issuing the response.
|
code
protected final int code
The HTTP status code of the response.
codeClass
protected final int codeClass
The class of the response. This is the most significant digit of the
status code.
1xx
- Informational response
2xx
- Success
3xx
- Redirection
4xx
- Client error
5xx
- Server error
headers
protected final Headers headers
The response headers.
majorVersion
protected final int majorVersion
The HTTP major version of the server issuing the response.
message
protected final String message
Human-readable text of the response.
minorVersion
protected final int minorVersion
The HTTP minor version of the server issuing the response.
Response
protected Response(int majorVersion,
int minorVersion,
int code,
int codeClass,
String message,
Headers headers)
Constructs a new response with the specified parameters.
getCode
public int getCode()
Returns the HTTP status code of the response.
code
getCodeClass
public int getCodeClass()
Returns the class of the response.
codeClass
getDateHeader
public Date getDateHeader(String name)
Returns the header value for the specified name as a date.
name
- the header name
getHeader
public String getHeader(String name)
Returns the header value for the specified name.
name
- the header name
getHeaders
public Headers getHeaders()
Returns the headers in the response.
getIntHeader
public int getIntHeader(String name)
Returns the header value for the specified name as an integer.
name
- the header name
getMajorVersion
public int getMajorVersion()
Returns the HTTP major version of the server issuing the response.
majorVersion
getMessage
public String getMessage()
Returns the human-readable text of the response.
message
getMinorVersion
public int getMinorVersion()
Returns the HTTP minor version of the server issuing the response.
minorVersion
© Copyright 2003 The Free Software Foundation,
all rights reserved