public class FormURLEncodedBody extends Body
| Modifier and Type | Class and Description |
|---|---|
static class |
FormURLEncodedBody.Factory |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APPLICATION_FORM_URL_ENCODED |
static ContentType |
CT_APPLICATION_FORM_URL_ENCODED |
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 |
|---|
FormURLEncodedBody(HeaderSet headers,
ContentType contentType,
QueryStringHeaderSet params) |
FormURLEncodedBody(HeaderSet headers,
ContentType contentType,
QueryStringHeaderSet params,
boolean encode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contentAvailable() |
static FormURLEncodedBody |
createBody() |
void |
formEncode(java.io.OutputStream into,
java.lang.String encoding) |
QueryStringHeaderSet |
getParameters() |
static java.util.Map<java.lang.String,QueryStringHeaderSet.QueryStringHeader> |
getParams(Message m) |
static FormURLEncodedBody |
locate(Message m)
Locate the FormURLEncodedBody from the message content if it exists.
|
static void |
main(java.lang.String[] args) |
protected void |
parse(java.io.InputStream is)
Parse a body from a specific InputStream.
|
static Headers |
parseParams(java.lang.String parameters,
java.lang.String encoding) |
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 APPLICATION_FORM_URL_ENCODED
public static final ContentType CT_APPLICATION_FORM_URL_ENCODED
public FormURLEncodedBody(HeaderSet headers, ContentType contentType, QueryStringHeaderSet params)
public FormURLEncodedBody(HeaderSet headers, ContentType contentType, QueryStringHeaderSet params, boolean encode)
public QueryStringHeaderSet getParameters() throws java.io.IOException
java.io.IOExceptionpublic static Headers parseParams(java.lang.String parameters, java.lang.String encoding) throws java.io.IOException
java.io.IOExceptionpublic boolean contentAvailable()
contentAvailable in class Bodypublic static FormURLEncodedBody createBody()
public static java.util.Map<java.lang.String,QueryStringHeaderSet.QueryStringHeader> getParams(Message m) throws java.io.IOException
java.io.IOExceptionpublic static FormURLEncodedBody locate(Message m) throws java.io.IOException
m - The Message in which to locate the FormURLEncodedBodyjava.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.IOExceptionpublic void formEncode(java.io.OutputStream into,
java.lang.String encoding)
throws java.io.IOException
java.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 static void main(java.lang.String[] args)
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel