|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.util.http.HTTPPayload
public final class HTTPPayload
HTTP payload helper functions.
Constructor Summary | |
---|---|
HTTPPayload(java.io.InputStream is,
boolean st,
InputInfo ii,
Prop pr)
Constructor. |
Method Summary | |
---|---|
static java.lang.String |
contentType(java.lang.String ctype)
Extracts the content from a "Content-type" header. |
java.util.HashMap<java.lang.String,Value> |
multiForm(java.lang.String ext)
Returns a map with multipart form data. |
FElem |
parse(boolean error,
java.lang.String ctype,
java.lang.String utype)
Parses the HTTP payload and returns a result body element. |
Value |
payloads()
Returns all payloads. |
static Value |
value(IO in,
Prop prop,
java.lang.String ctype,
java.lang.String ext)
Returns an XQuery value for the specified content type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTTPPayload(java.io.InputStream is, boolean st, InputInfo ii, Prop pr)
is
- input streamst
- only create statusii
- input infopr
- database propertiesMethod Detail |
---|
public FElem parse(boolean error, java.lang.String ctype, java.lang.String utype) throws java.io.IOException, QueryException
error
- error flagctype
- content type defined in the connectionutype
- content type specified by the user
java.io.IOException
- I/O exception
QueryException
- query exceptionpublic Value payloads()
public java.util.HashMap<java.lang.String,Value> multiForm(java.lang.String ext) throws java.io.IOException, QueryException
ext
- content type extension (may be null
)
null
java.io.IOException
- I/O exception
QueryException
- query exceptionpublic static Value value(IO in, Prop prop, java.lang.String ctype, java.lang.String ext) throws java.io.IOException, QueryException
in
- input sourceprop
- database propertiesctype
- content typeext
- content type extension (may be null
)
java.io.IOException
- I/O exception
QueryException
- query exceptionpublic static java.lang.String contentType(java.lang.String ctype)
ctype
- value for "Content-type" header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |