public class MultiPartBodyParser extends java.lang.Object implements BodyParser<MultiPartBodyParser.MultiPartBody>
MIMEUtils.MIME_MULTIPART_FORM_ENCODED_DATA.
It uses a buffer, typically useful when the content of a file is uploaded. Default size is 4096 bytes but can be
changed using the "hoka.buffer.size" property.| Modifier and Type | Class and Description |
|---|---|
static class |
MultiPartBodyParser.MultiPartBody
Class representing the collection of
HTTPPart in the request. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BOUNDARY
The boundary delimiter.
|
| Constructor and Description |
|---|
MultiPartBodyParser() |
| Modifier and Type | Method and Description |
|---|---|
MultiPartBodyParser.MultiPartBody |
parseBody(java.io.InputStream inputStream,
java.lang.String contentType)
Initialize the parsing, must be called before
MultiPartBodyParser.MultiPartBody.nextPart(). |
public static final java.lang.String BOUNDARY
public MultiPartBodyParser.MultiPartBody parseBody(java.io.InputStream inputStream, java.lang.String contentType) throws java.io.IOException
MultiPartBodyParser.MultiPartBody.nextPart(). This function does not consume
the inputStream.parseBody in interface BodyParser<MultiPartBodyParser.MultiPartBody>inputStream - the body InputStream.contentType - the "content-type" header of the request.java.io.IOException - when an IOException occurs during the parsing.