|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.wbi.protocol.http.HttpHeaderAscii
|
+--com.ibm.wbi.protocol.http.HttpResponseHeader
HttpResponseHeader represents the header of an HTTP response.
HttpRequestHeader,
HttpHeaderAscii| Field Summary | |
protected java.lang.String |
code
|
protected static java.lang.String |
DEFAULT_CODE
|
protected static java.lang.String |
DEFAULT_MESSAGE
|
protected java.lang.String |
message
|
| Fields inherited from class com.ibm.wbi.protocol.http.HttpHeaderAscii |
httpVersion, mime, stamp |
| Constructor Summary | |
HttpResponseHeader()
Construct a new, empty HttpRepsonseHeader with
default code (200), message ("Ok"), and version ("HTTP/1.0"). |
|
HttpResponseHeader(byte[] h)
Construct a new HttpResponseHeader from the
specified bytes representing ASCII characters. |
|
HttpResponseHeader(byte[] h,
int offset,
int length)
Construct a new HttpResponseHeader from the
specified bytes representing ASCII characters. |
|
HttpResponseHeader(HttpResponseHeader old)
Construct a new HttpResponseHeader that is a copy
of another. |
|
HttpResponseHeader(MimeHeaderAscii m)
Construct a new HttpRepsonseHeader with default
code (200), message ("Ok"), and version ("HTTP/1.0") and the
specified MIME headers. |
|
HttpResponseHeader(java.lang.String s)
Construct a new HttpRepsonseHeader from the
specified String. |
|
| Method Summary | |
byte[] |
asciiGetBytes()
Return a textual representation of this header, encoded into bytes with US-ASCII encoding. |
java.lang.Object |
clone()
Return a clone of this HttpResponseHeader. |
java.lang.String |
getCode()
Return the HTTP status code. |
java.lang.String |
getMessage()
Get the HTTP status message. |
static void |
main(java.lang.String[] argv)
|
protected void |
parseFirstLine(java.lang.String line)
|
void |
setCode(java.lang.String s)
Set the HTTP status code. |
void |
setMessage(java.lang.String s)
Set the HTTP status message. |
java.lang.String |
toString()
Return a String representation of this header. |
| Methods inherited from class com.ibm.wbi.protocol.http.HttpHeaderAscii |
add, add, copyMimeHeader, get, getAll, getMimeHeaderString, getRaw, getVersion, keys, parseAllHeaderFields, parseAllSplitHeaderFields, parseAllSplitHeaderFields, parseHeader, parseHeaderField, remove, set, set, setVersion, stamp, stamped |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String code
protected java.lang.String message
protected static final java.lang.String DEFAULT_CODE
protected static final java.lang.String DEFAULT_MESSAGE
| Constructor Detail |
public HttpResponseHeader()
HttpRepsonseHeader with
default code (200), message ("Ok"), and version ("HTTP/1.0").public HttpResponseHeader(MimeHeaderAscii m)
HttpRepsonseHeader with default
code (200), message ("Ok"), and version ("HTTP/1.0") and the
specified MIME headers.m - The MIME headers to use.
public HttpResponseHeader(byte[] h)
throws MalformedHeaderException
HttpResponseHeader from the
specified bytes representing ASCII characters.h - The bytes.
public HttpResponseHeader(byte[] h,
int offset,
int length)
throws MalformedHeaderException
HttpResponseHeader from the
specified bytes representing ASCII characters.h - The array containing the bytes.offset - The offset within the array where the bytes start.length - The length of the bytes within the array.
public HttpResponseHeader(java.lang.String s)
throws MalformedHeaderException
HttpRepsonseHeader from the
specified String.s - The String containing the header text.public HttpResponseHeader(HttpResponseHeader old)
HttpResponseHeader that is a copy
of another.old - The header to copy.| Method Detail |
public java.lang.Object clone()
HttpResponseHeader.clone in class java.lang.Objectpublic java.lang.String getCode()
public void setCode(java.lang.String s)
s - The HTTP status code.public java.lang.String getMessage()
public void setMessage(java.lang.String s)
s - The HTTP status message.public java.lang.String toString()
toString in class HttpHeaderAsciipublic byte[] asciiGetBytes()
protected void parseFirstLine(java.lang.String line)
parseFirstLine in class HttpHeaderAsciipublic static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||