|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.http.GeneralHeader
rabbit.http.HttpHeader
rabbit.http.HttpHeaderWithContent
public class HttpHeaderWithContent
A http header with some predefined content
| Field Summary |
|---|
| Fields inherited from class rabbit.http.GeneralHeader |
|---|
headers |
| Constructor Summary | |
|---|---|
HttpHeaderWithContent()
Create a new HTTPHeader from scratch |
|
| Method Summary | |
|---|---|
protected void |
fillBuffer(StringBuilder sb)
Fill the given StringBuilder with text from this header. |
byte[] |
getBytes()
Convert this header to a byte[]. |
byte[] |
getContent()
Get the current content for this request/response. |
void |
setContent(byte[] content)
Set the Content for the request/response Mostly not used for responses. |
void |
setContent(String data,
String charset)
Set the Content for the request/response Mostly not used for responses. |
| Methods inherited from class rabbit.http.HttpHeader |
|---|
equals, getHTTPVersion, getMethod, getReasonPhrase, getRequestLine, getRequestURI, getResponseHTTPVersion, getStatusCode, getStatusLine, hashCode, isDot9Request, isHeadOnlyRequest, isRequest, isResponse, isSecure, isSSLRequest, read, setHTTPVersion, setMehtod, setReasonPhrase, setRequestLine, setRequestURI, setResponseHTTPVersion, setStatusCode, setStatusLine, write |
| Methods inherited from class rabbit.http.GeneralHeader |
|---|
addHeader, addHeader, copyHeader, getHeader, getHeaders, iterator, removeHeader, removeValue, setExistingValue, setHeader, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpHeaderWithContent()
| Method Detail |
|---|
protected void fillBuffer(StringBuilder sb)
GeneralHeader
fillBuffer in class HttpHeadersb - the StringBuilder this header is written topublic byte[] getBytes()
HttpHeader
getBytes in class HttpHeaderpublic void setContent(byte[] content)
content - the binary content.
public void setContent(String data,
String charset)
data - the String to setcharset - the character encoding to use when converting the
string to bytes
IllegalArgumentException - if the charset is unknownpublic byte[] getContent()
HttpHeader
getContent in class HttpHeader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||