| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Executor | |
| private long | fieldSizeThreshold
The threshold of form field size to persist to disk. |
| private long | |
| private long | |
| private static final long | MINSIZE
Proposed default MINSIZE as 16 KB for content in memory before persisting to disk if file content exceeds
|
| public static final String | |
| private Path |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public FormDataParser | create(final HttpServerExchange exchange)
Implements io.
|
| public String | |
| public Executor | |
| public long | |
| public Path | |
| public MultiPartParserDefinition | setDefaultEncoding(final String defaultEncoding)
Implements io.
|
| public MultiPartParserDefinition | |
| public MultiPartParserDefinition | |
| public void | |
| public void | |
| public MultiPartParserDefinition |
| defaultEncoding | back to summary |
|---|---|
| private String defaultEncoding | |
| executor | back to summary |
|---|---|
| private Executor executor | |
| fieldSizeThreshold | back to summary |
|---|---|
| private long fieldSizeThreshold The threshold of form field size to persist to disk. It takes effect only for the form fields which do not have filename specified. | |
| fileSizeThreshold | back to summary |
|---|---|
| private long fileSizeThreshold | |
| maxIndividualFileSize | back to summary |
|---|---|
| private long maxIndividualFileSize | |
| MINSIZE | back to summary |
|---|---|
| private static final long MINSIZE Proposed default MINSIZE as 16 KB for content in memory before persisting to disk if file content exceeds
| |
| MULTIPART_FORM_DATA | back to summary |
|---|---|
| public static final String MULTIPART_FORM_DATA | |
| tempFileLocation | back to summary |
|---|---|
| private Path tempFileLocation | |
| MultiPartParserDefinition | back to summary |
|---|---|
| public MultiPartParserDefinition() | |
| MultiPartParserDefinition | back to summary |
|---|---|
| public MultiPartParserDefinition(final Path tempDir) | |
| create | back to summary |
|---|---|
| public FormDataParser create(final HttpServerExchange exchange) Implements io.
| |
| getDefaultEncoding | back to summary |
|---|---|
| public String getDefaultEncoding() | |
| getExecutor | back to summary |
|---|---|
| public Executor getExecutor() | |
| getMaxIndividualFileSize | back to summary |
|---|---|
| public long getMaxIndividualFileSize() | |
| getTempFileLocation | back to summary |
|---|---|
| public Path getTempFileLocation() | |
| setDefaultEncoding | back to summary |
|---|---|
| public MultiPartParserDefinition setDefaultEncoding(final String defaultEncoding) Implements io. | |
| setExecutor | back to summary |
|---|---|
| public MultiPartParserDefinition setExecutor(final Executor executor) | |
| setFieldSizeThreshold | back to summary |
|---|---|
| public MultiPartParserDefinition setFieldSizeThreshold(long fieldSizeThreshold) | |
| setFileSizeThreshold | back to summary |
|---|---|
| public void setFileSizeThreshold(long fileSizeThreshold) | |
| setMaxIndividualFileSize | back to summary |
|---|---|
| public void setMaxIndividualFileSize(final long maxIndividualFileSize) | |
| setTempFileLocation | back to summary |
|---|---|
| public MultiPartParserDefinition setTempFileLocation(Path tempFileLocation) | |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| FileTooLargeException | back to summary |
|---|---|
| public FileTooLargeException() | |
| FileTooLargeException | back to summary |
|---|---|
| public FileTooLargeException(String message) | |
| FileTooLargeException | back to summary |
|---|---|
| public FileTooLargeException(String message, Throwable cause) | |
| FileTooLargeException | back to summary |
|---|---|
| public FileTooLargeException(Throwable cause) | |
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteArrayOutputStream | |
| private final List | |
| private long | |
| private String | |
| private final FormData | |
| private String | |
| private final HttpServerExchange | |
| private final long | |
| private Path | |
| private FileChannel | |
| private String | |
| private final long | |
| private HttpHandler | |
| private HeaderMap | |
| private final long | |
| private final MultipartParser. |
| Access | Constructor and Description |
|---|---|
| private | MultiPartUploadHandler(final HttpServerExchange exchange, final String boundary, final long maxIndividualFileSize, final long fileSizeThreshold, final String defaultEncoding, final long fieldSizeThreshold)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | beginPart(final HeaderMap headers)
Implements io.
|
| public void | close()
Implements io. Closes the parser, and removes and temporary files that may have been created. |
| private Path | |
| public void | |
| public void | |
| private String | |
| public List | |
| public void | parse(final HttpHandler handler)
Implements io. Parse the form data asynchronously. |
| public FormData | parseBlocking()
Implements io. Parse the data, blocking the current thread until parsing is complete. |
| public void | setCharacterEncoding(final String
The encoding encoding)Implements io. Sets the character encoding that will be used by this parser. |
| contentBytes | back to summary |
|---|---|
| private final ByteArrayOutputStream contentBytes | |
| createdFiles | back to summary |
|---|---|
| private final List<Path> createdFiles | |
| currentFileSize | back to summary |
|---|---|
| private long currentFileSize | |
| currentName | back to summary |
|---|---|
| private String currentName | |
| data | back to summary |
|---|---|
| private final FormData data | |
| defaultEncoding | back to summary |
|---|---|
| private String defaultEncoding | |
| exchange | back to summary |
|---|---|
| private final HttpServerExchange exchange | |
| fieldSizeThreshold | back to summary |
|---|---|
| private final long fieldSizeThreshold | |
| file | back to summary |
|---|---|
| private Path file | |
| fileChannel | back to summary |
|---|---|
| private FileChannel fileChannel | |
| fileName | back to summary |
|---|---|
| private String fileName | |
| fileSizeThreshold | back to summary |
|---|---|
| private final long fileSizeThreshold | |
| handler | back to summary |
|---|---|
| private HttpHandler handler | |
| headers | back to summary |
|---|---|
| private HeaderMap headers | |
| maxIndividualFileSize | back to summary |
|---|---|
| private final long maxIndividualFileSize | |
| parser | back to summary |
|---|---|
| private final MultipartParser. | |
| MultiPartUploadHandler | back to summary |
|---|---|
| private MultiPartUploadHandler(final HttpServerExchange exchange, final String boundary, final long maxIndividualFileSize, final long fileSizeThreshold, final String defaultEncoding, final long fieldSizeThreshold) | |
| beginPart | back to summary |
|---|---|
| public void beginPart(final HeaderMap headers) Implements io.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements io. Doc from io. Closes the parser, and removes and temporary files that may have been created.
| |
| createFile | back to summary |
|---|---|
| private Path createFile() throws IOException | |
| data | back to summary |
|---|---|
| public void data(final ByteBuffer buffer) throws IOException Implements io.
| |
| endPart | back to summary |
|---|---|
| public void endPart() Implements io.
| |
| getCharset | back to summary |
|---|---|
| private String getCharset() | |
| getCreatedFiles | back to summary |
|---|---|
| public List | |
| parse | back to summary |
|---|---|
| public void parse(final HttpHandler handler) throws Exception Implements io. Doc from io. Parse the form data asynchronously. If all the data cannot be read immediately then a read listener will be registered, and the data will be parsed by the read thread.
When this method completes the handler will be invoked, and the data
will be attached under The method can either invoke the next handler directly, or may delegate to the IO thread to perform the parsing.
| |
| parseBlocking | back to summary |
|---|---|
| public FormData parseBlocking() throws IOException Implements io. Doc from io. Parse the data, blocking the current thread until parsing is complete. For blocking handlers this method is
more efficient than
| |
| setCharacterEncoding | back to summary |
|---|---|
| public void setCharacterEncoding(final String encoding) Implements io. Doc from io. Sets the character encoding that will be used by this parser. If the request is already processed this will have no effect | |
| Modifier and Type | Field and Description |
|---|---|
| private final Executor | |
| private final StreamSourceChannel |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| executor | back to summary |
|---|---|
| private final Executor executor | |
| requestChannel | back to summary |
|---|---|
| private final StreamSourceChannel requestChannel | |
| NonBlockingParseTask | back to summary |
|---|---|
| private NonBlockingParseTask(Executor executor, StreamSourceChannel requestChannel) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |