|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.Network.HTTP.HTTPResponse
public class HTTPResponse
| Field Summary | |
|---|---|
private java.util.Hashtable<java.lang.String,java.lang.String> |
headers
Contains the HTTP response headers. |
private int |
responseCode
An int representing the three digit HTTP Status-Code. |
private java.lang.String |
responseMessage
It is a short description of the status code provided by the server |
| Constructor Summary | |
|---|---|
HTTPResponse()
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getHeaderField(java.lang.String name)
Returns the value of the named header field. |
java.util.Enumeration<java.lang.String> |
getHeaders()
Returns an unmodifiable Enumeration of the header names. |
int |
getResponseCode()
Retuns the response code. |
java.lang.String |
getResponseMessage()
Returns the response message. |
void |
list(java.io.PrintStream out)
Prints this HTTPResponse out to the specified output stream. |
void |
reset()
Sets the attributes to inital values. |
void |
setHeaderField(java.lang.String name,
java.lang.String value)
Puts the value of the named header field. |
void |
setResponseCode(int responseCode)
Sets the response code. |
void |
setResponseMessage(java.lang.String responseMessage)
Sets the response message. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int responseCode
int representing the three digit HTTP Status-Code.
Allowed values in StatusCodes
private java.lang.String responseMessage
private java.util.Hashtable<java.lang.String,java.lang.String> headers
| Constructor Detail |
|---|
public HTTPResponse()
| Method Detail |
|---|
public void setResponseCode(int responseCode)
responseCode - the response code value.public int getResponseCode()
public void setResponseMessage(java.lang.String responseMessage)
responseMessage - the response message.public java.lang.String getResponseMessage()
public void setHeaderField(java.lang.String name,
java.lang.String value)
name - the name of the header field.value - the value of the header field.public java.lang.String getHeaderField(java.lang.String name)
If called on a connection that sets the same header multiple times with possibly different values, only the last value is returned.
name - the name of a header field.
null
if there is no such field in the header.public java.util.Enumeration<java.lang.String> getHeaders()
The Enumeration keys are Strings that represent the response-header field names.
public void reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||