| Modifier and Type | Method and Description |
|---|---|
CloseableIterator<BlockingIOAdapter.ParserToken> |
forBlockingIO(InputStream inputStream)
Creates the
CloseableIterator. |
NioMultipartParser |
forNIO(NioMultipartParserListener listener)
Builds a
NioMultipartParser. |
Multipart.Builder |
limitNestingPartsTo(int nestedMultipartsAllowed)
Specifies how many nested parts are allowed.
|
Multipart.Builder |
saveTemporaryFilesTo(String rootFolder)
Configures the folder where temporary files are stored during the processing.
|
Multipart.Builder |
usePartBodyStreamStorageFactory(PartBodyStreamStorageFactory partBodyStreamStorageFactory)
Configures a specific
PartBodyStreamStorageFactory to use. |
Multipart.Builder |
withBufferSize(int bufferSize)
Configures a specific buffer size to use during the parsing.
|
Multipart.Builder |
withHeadersSizeLimit(int headersSizeLimit)
Configures a specific headers section limit.
|
Multipart.Builder |
withMaxMemoryUsagePerBodyPart(int bodySizeThreshold)
Configures the threshold defining how many bytes of a part's body will be kept in memory before flushing them to disk.
|
public Multipart.Builder withBufferSize(int bufferSize)
Configures a specific buffer size to use during the parsing.
bufferSize - The buffer size in bytes.Builder itself.public Multipart.Builder withHeadersSizeLimit(int headersSizeLimit)
Configures a specific headers section limit.
headersSizeLimit - headers section limit in bytes.Builder itself.public Multipart.Builder saveTemporaryFilesTo(String rootFolder)
Configures the folder where temporary files are stored during the processing.
This configuration is only valid if the default PartBodyStreamStorageFactory is used.
If a different PartBodyStreamStorageFactory is selected using usePartBodyStreamStorageFactory(PartBodyStreamStorageFactory)
the configuration has no effect.
rootFolder - The location where to store the temporary files.Builder itself.public Multipart.Builder withMaxMemoryUsagePerBodyPart(int bodySizeThreshold)
Configures the threshold defining how many bytes of a part's body will be kept in memory before flushing them to disk.
This configuration is only valid if the default PartBodyStreamStorageFactory is used.
If a different PartBodyStreamStorageFactory is selected using usePartBodyStreamStorageFactory(PartBodyStreamStorageFactory)
the configuration has no effect.
bodySizeThreshold - how many bytes of a part's body will be kept in memory before flushing them to disk.Builder itself.public Multipart.Builder usePartBodyStreamStorageFactory(PartBodyStreamStorageFactory partBodyStreamStorageFactory)
Configures a specific PartBodyStreamStorageFactory to use.
partBodyStreamStorageFactory - The PartBodyStreamStorageFactory to useBuilder itself.public Multipart.Builder limitNestingPartsTo(int nestedMultipartsAllowed)
Specifies how many nested parts are allowed.
nestedMultipartsAllowed - Number of nested parts allowedBuilder itself.public NioMultipartParser forNIO(NioMultipartParserListener listener)
Builds a NioMultipartParser. Use this to process the multipart stream in a non blocking fashion.
listener - The NioMultipartParserListener listenerNioMultipartParserpublic CloseableIterator<BlockingIOAdapter.ParserToken> forBlockingIO(InputStream inputStream)
Creates the CloseableIterator. Use this to process in a blocking IO manner.
inputStream - The InputStream with the multipart content.CloseableIteratorCopyright © 2017. All rights reserved.