/** * <p> * Parses the multipart stream and it return the parts in form of {@link Iterable}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param partBodyStreamStorageFactory The {@code PartBodyStreamStorageFactory} to use * @param bufferSize The buffer size in bytes * @param maxHeadersSectionSize The max size of the headers section in bytes * @param maxLevelOfNestedMultipart the max number of nested multipart * @return the parts in the form of a closeable iterator */ @SuppressWarnings("unchecked") public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final PartBodyStreamStorageFactory partBodyStreamStorageFactory, final int bufferSize, final int maxHeadersSectionSize, final int maxLevelOfNestedMultipart) { return new PartItemsIterator(inputStream, multipartContext, partBodyStreamStorageFactory, bufferSize, maxHeadersSectionSize, maxLevelOfNestedMultipart); }
/** * <p> * Parses the multipart stream and it return the parts in form of {@link Iterable}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param partBodyStreamStorageFactory The {@code PartBodyStreamStorageFactory} to use * @param bufferSize The buffer size in bytes * @param maxHeadersSectionSize The max size of the headers section in bytes * @param maxLevelOfNestedMultipart the max number of nested multipart * @return the parts in the form of a closeable iterator */ @SuppressWarnings("unchecked") public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final PartBodyStreamStorageFactory partBodyStreamStorageFactory, final int bufferSize, final int maxHeadersSectionSize, final int maxLevelOfNestedMultipart) { return new PartItemsIterator(inputStream, multipartContext, partBodyStreamStorageFactory, bufferSize, maxHeadersSectionSize, maxLevelOfNestedMultipart); }