public class BlockingIOAdapter extends Object
Adapts the NioMultipartParser to work with blocking IO.
The adapter exposes a set of static methods that return a CloseableIterator over the parts.
An alternative way to obtain the CloseableIterator is using the fluent API offered by Multipart.
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockingIOAdapter.NestedEnd
Marker
PartItem signalling the end of a nested multipart. |
static class |
BlockingIOAdapter.NestedStart
Marker
PartItem signalling the start of a nested multipart. |
static interface |
BlockingIOAdapter.ParserToken
Interface representing a parser token.
|
static class |
BlockingIOAdapter.Part
A
PartItem representing an attachment part. |
| Constructor and Description |
|---|
BlockingIOAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static CloseableIterator<BlockingIOAdapter.ParserToken> |
parse(InputStream inputStream,
MultipartContext multipartContext)
Parses the multipart stream and it returns the parts in form of
CloseableIterator. |
static CloseableIterator<BlockingIOAdapter.ParserToken> |
parse(InputStream inputStream,
MultipartContext multipartContext,
int bufferSize)
Parses the multipart stream and it return the parts in form of
CloseableIterator. |
static CloseableIterator<BlockingIOAdapter.ParserToken> |
parse(InputStream inputStream,
MultipartContext multipartContext,
PartBodyStreamStorageFactory partBodyStreamStorageFactory)
Parses the multipart stream and it return the parts in form of
CloseableIterator. |
static CloseableIterator<BlockingIOAdapter.ParserToken> |
parse(InputStream inputStream,
MultipartContext multipartContext,
PartBodyStreamStorageFactory partBodyStreamStorageFactory,
int bufferSize,
int maxHeadersSectionSize,
int maxLevelOfNestedMultipart)
Parses the multipart stream and it return the parts in form of
Iterable. |
public static CloseableIterator<BlockingIOAdapter.ParserToken> parse(InputStream inputStream, MultipartContext multipartContext)
Parses the multipart stream and it returns the parts in form of CloseableIterator.
inputStream - The multipart streammultipartContext - The multipart contextpublic static CloseableIterator<BlockingIOAdapter.ParserToken> parse(InputStream inputStream, MultipartContext multipartContext, PartBodyStreamStorageFactory partBodyStreamStorageFactory)
Parses the multipart stream and it return the parts in form of CloseableIterator.
inputStream - The multipart streammultipartContext - The multipart contextpartBodyStreamStorageFactory - The PartBodyStreamStorageFactory to usepublic static CloseableIterator<BlockingIOAdapter.ParserToken> parse(InputStream inputStream, MultipartContext multipartContext, int bufferSize)
Parses the multipart stream and it return the parts in form of CloseableIterator.
inputStream - The multipart streammultipartContext - The multipart contextbufferSize - The buffer size in bytespublic static CloseableIterator<BlockingIOAdapter.ParserToken> parse(InputStream inputStream, MultipartContext multipartContext, PartBodyStreamStorageFactory partBodyStreamStorageFactory, int bufferSize, int maxHeadersSectionSize, int maxLevelOfNestedMultipart)
Parses the multipart stream and it return the parts in form of Iterable.
inputStream - The multipart streammultipartContext - The multipart contextpartBodyStreamStorageFactory - The PartBodyStreamStorageFactory to usebufferSize - The buffer size in bytesmaxHeadersSectionSize - The max size of the headers section in bytesmaxLevelOfNestedMultipart - the max number of nested multipartCopyright © 2017. All rights reserved.