gnu.inet.http
Class Response
public class Response
extends java.lang.Object
An HTTP response.
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
2xx
3xx
4xx
5xx
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.
getCodeClass
public int getCodeClass()
Returns the class of the response.
getDateHeader
public Date getDateHeader(String name)
Returns the header value for the specified name as a date.
getHeader
public String getHeader(String name)
Returns the header value for the specified 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.
getMajorVersion
public int getMajorVersion()
Returns the HTTP major version of the server issuing the response.
getMessage
public String getMessage()
Returns the human-readable text of the response.
getMinorVersion
public int getMinorVersion()
Returns the HTTP minor version of the server issuing the response.
© Copyright 2003 The Free Software Foundation,
all rights reserved