|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.http.message.PartSeriesConsumer
public class PartSeriesConsumer
The PartListConsumer object is used to consume a list
of parts encoded in the multipart format. This is can consume any
number of parts from a cursor. Each part consumed is added to an
internal part list which can be used to acquire the contents of the
upload and inspect the headers provided for each uploaded part. To
ensure that only a fixed number of bytes are consumed this uses a
content length for an internal buffer.
| Constructor Summary | |
|---|---|
PartSeriesConsumer(Allocator allocator,
byte[] boundary)
Constructor for the PartListConsumer object. |
|
PartSeriesConsumer(Allocator allocator,
byte[] boundary,
long length)
Constructor for the PartListConsumer object. |
|
PartSeriesConsumer(Allocator allocator,
PartSeries series,
byte[] boundary)
Constructor for the PartListConsumer object. |
|
PartSeriesConsumer(Allocator allocator,
PartSeries series,
byte[] boundary,
long length)
Constructor for the PartListConsumer object. |
|
| Method Summary | |
|---|---|
void |
consume(Cursor cursor)
This is used to consume the part list from the cursor. |
Body |
getBody()
This is used to acquire the body that has been consumed. |
boolean |
isFinished()
This is used to determine whether the part body has been read from the cursor successfully. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PartSeriesConsumer(Allocator allocator,
byte[] boundary)
PartListConsumer object. This
will create a consumer that is capable of breaking an upload in
to individual parts so that they can be accessed and used by
the receiver of the HTTP request message.
allocator - this is used to allocate the internal bufferboundary - this is the boundary used for the upload
public PartSeriesConsumer(Allocator allocator,
byte[] boundary,
long length)
PartListConsumer object. This
will create a consumer that is capable of breaking an upload in
to individual parts so that they can be accessed and used by
the receiver of the HTTP request message.
allocator - this is used to allocate the internal bufferboundary - this is the boundary used for the uploadlength - this is the number of bytes the upload should be
public PartSeriesConsumer(Allocator allocator,
PartSeries series,
byte[] boundary)
PartListConsumer object. This
will create a consumer that is capable of breaking an upload in
to individual parts so that they can be accessed and used by
the receiver of the HTTP request message.
allocator - this is used to allocate the internal bufferboundary - this is the boundary used for the uploadseries - this is the part list used to accumulate the parts
public PartSeriesConsumer(Allocator allocator,
PartSeries series,
byte[] boundary,
long length)
PartListConsumer object. This
will create a consumer that is capable of breaking an upload in
to individual parts so that they can be accessed and used by
the receiver of the HTTP request message.
allocator - this is used to allocate the internal bufferseries - this is the part list used to accumulate the partsboundary - this is the boundary used for the uploadlength - this is the number of bytes the upload should be| Method Detail |
|---|
public Body getBody()
Attachment objects.
Each part can then be read as an individual message.
getBody in interface BodyConsumer
public void consume(Cursor cursor)
throws IOException
PartList object,
once the content has been consumed the terminal is consumed.
consume in interface Consumercursor - this is the cursor to consume the list from
IOExceptionpublic boolean isFinished()
isFinished in interface Consumer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||