Package org.simpleframework.http.message
Class PartEntryFactory
java.lang.Object
org.simpleframework.http.message.PartEntryFactory
This
PartEntryFactory
object provides a factory for
creating part entry consumers. The part entry consumers created
read individual entries from a list of parts within a stream.
This is basically a convenience factory for the list consumer.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Allocator
This is used to allocate the buffers used by the entry.private final long
This is the length of the parent part series body.private final PartSeries
This is used to accumulate all the parts of the upload.private final byte[]
This is the terminal token used to delimiter the upload. -
Constructor Summary
ConstructorsConstructorDescriptionPartEntryFactory
(Allocator allocator, PartSeries series, byte[] terminal, long length) Constructor for thePartEntryFactory
object. -
Method Summary
Modifier and TypeMethodDescriptionThis creates a new part entry consumer that can be used to read the next part from the list.
-
Field Details
-
series
This is used to accumulate all the parts of the upload. -
allocator
This is used to allocate the buffers used by the entry. -
terminal
private final byte[] terminalThis is the terminal token used to delimiter the upload. -
length
private final long lengthThis is the length of the parent part series body.
-
-
Constructor Details
-
PartEntryFactory
Constructor for thePartEntryFactory
object. This is used to create a factory for entry consumers that can be used to read an entry from a part list.- Parameters:
allocator
- this is the allocator used for buffersseries
- this is the list of parts that are extractedterminal
- this is the terminal buffer to be usedlength
- this is the length of the parent part series
-
-
Method Details
-
getInstance
This creates a new part entry consumer that can be used to read the next part from the list. The consumer instantiated by this factory acquires the allocator, list and boundary from the enclosing part list consumer instance.- Returns:
- a part entry consumer for this part list consumer
-