|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetapp.manage.http.HTTPMessage
netapp.manage.http.HTTPResponse
This class represents a HTTP response.
| Field Summary |
| Fields inherited from class netapp.manage.http.HTTPMessage |
_contents, _header, _headerLowerCase, _version, METHOD_GET, METHOD_POST, VERSION_1_0, VERSION_1_1 |
| Constructor Summary | |
HTTPResponse(int version,
int statusCode,
java.lang.String reasonPhrase)
Constructs a HTTPResponse. |
|
| Method Summary | |
boolean |
canKeepAlive()
Determine whether this response indicates that the socket can be used for additional requests. |
protected java.lang.String |
firstLine()
Get the first (status) line of this HTTP response. |
java.lang.String |
getReasonPhrase()
Get the textual status of this response. |
int |
getStatusCode()
Get the HTTP status of this response. |
static HTTPResponse |
read(java.io.InputStream in)
Create a new HTTP response by reading data from a socket. |
| Methods inherited from class netapp.manage.http.HTTPMessage |
getContents, getHeader, headersString, methodFromString, methodToString, processHeaderLine, readContents, readLine, removeHeader, setContents, setHeader, toString, versionFromString, versionToString, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HTTPResponse(int version,
int statusCode,
java.lang.String reasonPhrase)
HTTPResponse.
version - the HTTP version.statusCode - the HTTP status of the response.reasonPhrase - a textual description of the status (may be empty).| Method Detail |
public int getStatusCode()
public java.lang.String getReasonPhrase()
getStatusCode() contains all
the relevant information.
public static HTTPResponse read(java.io.InputStream in)
throws java.io.IOException,
HTTPException
in - an InputStream, presumably
connected to a client socket.
HTTPResponse.
java.io.IOException - if there is a communication error on
the InputStream.
HTTPException - if the HTTP response is malformed.public boolean canKeepAlive()
true if the socket can be reused,
otherwise false.protected java.lang.String firstLine()
firstLine in class HTTPMessage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||