/** * <p> * Parses the multipart stream and it returns the parts in form of {@code CloseableIterator}. * </p> * @param inputStream The multipart stream * @param multipartContext The multipart context * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext){ return parse(inputStream, multipartContext, null, DEFAULT_BUFFER_SIZE, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> * Parses the multipart stream and it return the parts in form of {@code CloseableIterator}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param partBodyStreamStorageFactory The {@code PartBodyStreamStorageFactory} to use * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final PartBodyStreamStorageFactory partBodyStreamStorageFactory) { return parse(inputStream, multipartContext, partBodyStreamStorageFactory, DEFAULT_BUFFER_SIZE, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> * Parses the multipart stream and it return the parts in form of {@code CloseableIterator}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param bufferSize The buffer size in bytes * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final int bufferSize) { return parse(inputStream, multipartContext, null, bufferSize, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> * Parses the multipart stream and it returns the parts in form of {@code CloseableIterator}. * </p> * @param inputStream The multipart stream * @param multipartContext The multipart context * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext){ return parse(inputStream, multipartContext, null, DEFAULT_BUFFER_SIZE, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> * Parses the multipart stream and it return the parts in form of {@code CloseableIterator}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param partBodyStreamStorageFactory The {@code PartBodyStreamStorageFactory} to use * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final PartBodyStreamStorageFactory partBodyStreamStorageFactory) { return parse(inputStream, multipartContext, partBodyStreamStorageFactory, DEFAULT_BUFFER_SIZE, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> * Parses the multipart stream and it return the parts in form of {@code CloseableIterator}. * </p> * * @param inputStream The multipart stream * @param multipartContext The multipart context * @param bufferSize The buffer size in bytes * @return the parts in the form of a closeable iterator */ public static CloseableIterator<ParserToken> parse(final InputStream inputStream, final MultipartContext multipartContext, final int bufferSize) { return parse(inputStream, multipartContext, null, bufferSize, DEFAULT_HEADERS_SECTION_SIZE, DEFAULT_MAX_LEVEL_OF_NESTED_MULTIPART); }
/** * <p> Creates the {@code CloseableIterator}. Use this to process in a blocking IO manner. * * @param inputStream The {@code InputStream} with the multipart content. * @return The {@code CloseableIterator} */ public CloseableIterator<ParserToken> forBlockingIO(final InputStream inputStream){ return BlockingIOAdapter.parse(inputStream, context, partStreamsFactory(), bufferSize, headersSizeLimit, nestedMultipartsAllowed); } }
/** * <p> Creates the {@code CloseableIterator}. Use this to process in a blocking IO manner. * * @param inputStream The {@code InputStream} with the multipart content. * @return The {@code CloseableIterator} */ public CloseableIterator<ParserToken> forBlockingIO(final InputStream inputStream){ return BlockingIOAdapter.parse(inputStream, context, partStreamsFactory(), bufferSize, headersSizeLimit, nestedMultipartsAllowed); } }