|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xml_project.morganaxproc.filesystem.HttpBody
public final class HttpBody
This class represents the http body of either an XProcHttpRequest or
an XProcHttpResponse.
| Constructor Summary | |
|---|---|
HttpBody(java.lang.String contentType,
boolean fixContentType)
Create a new HttpBody with the given content type. |
|
| Method Summary | |
|---|---|
byte[] |
getContent()
Return the content of this body as byte[]. |
nu.xom.Document |
getDocument()
Return document, that is content of this body. |
java.lang.String |
getHeader(java.lang.String name)
Return the value of the header with the given name. |
HttpHeader[] |
getHeaders()
Returns all headers found in this HttpBody. |
boolean |
isDocument()
Checks whether this HttpBody has an XOM document as content. |
void |
setContent(byte[] content)
Sets the content of this HttpBody. |
void |
setContent(nu.xom.Document doc)
Sets the content of this HttpBody. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header with the given name and the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpBody(java.lang.String contentType,
boolean fixContentType)
HttpBody with the given content type.
contentType - the content typefixContentType - flags whether the content type is fixed.| Method Detail |
|---|
public void setContent(byte[] content)
content - the contentpublic void setContent(nu.xom.Document doc)
doc - a XOM document as content.public boolean isDocument()
true if the content is a document, false otherwise.public byte[] getContent()
public nu.xom.Document getDocument()
public java.lang.String getHeader(java.lang.String name)
name - the header's name.
public void setHeader(java.lang.String name,
java.lang.String value)
name - the header's name.value - the header's value.public HttpHeader[] getHeaders()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||