public class MultipartParser extends Object
Constructor and Description |
---|
MultipartParser(ByteSource origin,
CharSequence boundary)
Create a MultipartParser.
|
Instance Methods | |
---|---|
MultipartParser |
maxHeaderNameBytes(int maxHeaderNameBytes)
Max length of part header names.
|
MultipartParser |
maxHeaderValueBytes(int maxHeaderValueBytes)
Max length of part header values.
|
MultipartParser |
maxHeadTotalBytes(int maxHeadTotalBytes)
Max length of the head section of parts.
|
Async<MultipartPart> |
getNextPart()
Get the next part.
|
void |
close()
Close this parser.
|
public MultipartParser(ByteSource origin, CharSequence boundary)
The `origin` should be a sequence of bytes in the multipart format, using `boundary`.
public MultipartParser maxHeaderNameBytes(int maxHeaderNameBytes)
default: 64
This method can be invoked before each getNextPart()
.
public MultipartParser maxHeaderValueBytes(int maxHeaderValueBytes)
default: 256
This method can be invoked before each getNextPart()
.
public MultipartParser maxHeadTotalBytes(int maxHeadTotalBytes)
default: 1024
This method can be invoked before each getNextPart()
.
public Async<MultipartPart> getNextPart()
This is an async action. If there are no more parts, the action fails with
End
.
public void close()
This method will also close the `origin` ByteSource.