public class JSONBody extends Body
| Modifier and Type | Class and Description |
|---|---|
static class |
JSONBody.Factory |
| Modifier and Type | Field and Description |
|---|---|
static ContentType |
CT_JSON |
static java.lang.String |
JSON_MEDIA_TYPE |
CAN_INVALIDATE, contentType, CT_APP_OCTET_STREAM, CT_DEFAULT, CT_MULTIPART_FORM_DATA, CT_MULTIPART_RELATED, CT_TEXT_PLAIN, CT_TEXT_XML_UTF8, CT_XOP_APPLICATION_XML, PUSH_WRITE, REMOVE_XFER_ENCODING_ON_WRITE_DEPRECATED, RETAIN_XFER_ENCODING_ON_READ, WRITE_NO_CTE| Constructor and Description |
|---|
JSONBody(HeaderSet headers,
ContentType contentType,
org.codehaus.jackson.JsonNode json) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contentAvailable() |
static JSONBody |
createBody() |
org.codehaus.jackson.JsonNode |
getJSON() |
static org.codehaus.jackson.JsonNode |
getJSON(Message m) |
org.codehaus.jackson.JsonNode |
getJsonNode() |
static JSONBody |
locate(Message m) |
protected void |
parse(java.io.InputStream is)
Parse a body from a specific InputStream.
|
protected void |
purgeContent()
Bodies are purged() when they are no longer in use.
|
void |
writeContent(java.io.OutputStream os,
int flags)
Write the content of the body to the specified OutputStream
This is similar to
Body.write(java.io.OutputStream, int), but does not include the
headers for the body. |
bufferInput, create, dispose, fini, getContentEncoding, getContentId, getContentLength, getContentType, getHeaders, getInputStream, getParent, getSource, initSource, parse, registerFactory, setParent, sevenbit, willwrite, writepublic static final java.lang.String JSON_MEDIA_TYPE
public static final ContentType CT_JSON
public JSONBody(HeaderSet headers, ContentType contentType, org.codehaus.jackson.JsonNode json)
public org.codehaus.jackson.JsonNode getJsonNode()
public static JSONBody createBody()
public org.codehaus.jackson.JsonNode getJSON()
throws java.io.IOException
java.io.IOExceptionpublic static org.codehaus.jackson.JsonNode getJSON(Message m) throws java.io.IOException
java.io.IOExceptionpublic static JSONBody locate(Message m) throws java.io.IOException
java.io.IOExceptionpublic void writeContent(java.io.OutputStream os,
int flags)
throws java.io.IOException
BodyBody.write(java.io.OutputStream, int), but does not include the
headers for the body.writeContent in class Bodyjava.io.IOExceptionprotected void parse(java.io.InputStream is)
throws java.io.IOException
Body
This should be considered "private" to callers:
it must be invoked via
Body.parse()
parse in class Bodyjava.io.IOExceptionBody.parse()protected void purgeContent()
BodypurgeContent in class Bodypublic boolean contentAvailable()
contentAvailable in class Body
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel