content
This is used to consume the content from the multipart upload.
BodyConsumer
, ByteConsumer
PartBodyConsumer
object is used to consume a part
the contents of a multipart body. This will consume the part and
add it to a part list, once the part has been consumed and added
to the part list a terminal token is consumed, which is a carriage
return and line feed.private ContentConsumer
private static final byte[]
private ByteConsumer
PartBodyConsumer(Allocator allocator,
Segment segment,
byte[] boundary)
PartBodyConsumer
object.PartBodyConsumer(Allocator allocator,
Segment segment,
PartSeries series,
byte[] boundary)
PartBodyConsumer
object.void
consume(ByteCursor cursor)
getBody()
boolean
PartBodyConsumer
object. This
is used to create a consumer that reads the body of a part in
a multipart request body. The terminal token must be provided
so that the end of the part body can be determined.allocator
- this is used to allocate the internal buffersegment
- this represents the headers for the part bodyboundary
- this is the message boundary for the body partPartBodyConsumer
object. This
is used to create a consumer that reads the body of a part in
a multipart request body. The terminal token must be provided
so that the end of the part body can be determined.allocator
- this is used to allocate the internal buffersegment
- this represents the headers for the part bodyseries
- this is the part list that this body belongs inboundary
- this is the message boundary for the body partAttachment
objects.
Each part can then be read as an individual message.getBody
in interface BodyConsumer
Part
interface
once the payload has been consumed the terminal is consumed.consume
in interface ByteConsumer
cursor
- this is the cursor to consume the body fromIOException
isFinished
in interface ByteConsumer