public class JSONBody extends Body
| Modifier and Type | Class and Description |
|---|---|
static class |
JSONBody.Factory |
| Modifier and Type | Field and Description |
|---|---|
static com.vordel.mime.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(com.vordel.mime.HeaderSet headers,
com.vordel.mime.ContentType contentType,
com.fasterxml.jackson.databind.JsonNode json) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contentAvailable() |
static JSONBody |
createBody() |
com.fasterxml.jackson.databind.JsonNode |
getJSON() |
static com.fasterxml.jackson.databind.JsonNode |
getJSON(Message m) |
com.fasterxml.jackson.databind.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 com.vordel.mime.ContentType CT_JSON
public JSONBody(com.vordel.mime.HeaderSet headers,
com.vordel.mime.ContentType contentType,
com.fasterxml.jackson.databind.JsonNode json)
public com.fasterxml.jackson.databind.JsonNode getJsonNode()
public static JSONBody createBody()
public com.fasterxml.jackson.databind.JsonNode getJSON()
throws java.io.IOException
java.io.IOExceptionpublic static com.fasterxml.jackson.databind.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 Bodyos - OutputStream The OutputStream destination for the Body.flags - Customize what gets written.java.io.IOException - If there are problems writing to the OutputStream.protected 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 Bodyis - The InputStream from which to parse the body.java.io.IOException - if there are problems reading from the InputStream.Body.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