public class MultiPartBodyParser extends Object implements BodyParser<MultiPartBodyParser.MultiPartBody>
Mime.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 String |
BOUNDARY
The boundary delimiter.
|
| Constructor and Description |
|---|
MultiPartBodyParser() |
| Modifier and Type | Method and Description |
|---|---|
MultiPartBodyParser.MultiPartBody |
parseBody(InputStream inputStream,
String contentType)
Initialize the parsing, must be called before
MultiPartBodyParser.MultiPartBody.nextPart(). |
public static final String BOUNDARY
public MultiPartBodyParser.MultiPartBody parseBody(InputStream inputStream, @Nullable String contentType) throws 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.IOException - when an IOException occurs during the parsing.