java.lang.AutoCloseable
, java.io.Closeable
public interface FormDataParser
extends java.io.Closeable
This parser must be closed to make sure any temporary files have been cleaned up.
Modifier and Type | Field | Description |
---|---|---|
static AttachmentKey<FormData> |
FORM_DATA |
When the form data is parsed it will be attached under this key.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes the parser, and removes and temporary files that may have been created.
|
void |
parse(HttpHandler next) |
Parse the form data asynchronously.
|
FormData |
parseBlocking() |
Parse the data, blocking the current thread until parsing is complete.
|
void |
setCharacterEncoding(java.lang.String encoding) |
Sets the character encoding that will be used by this parser.
|
static final AttachmentKey<FormData> FORM_DATA
void parse(HttpHandler next) throws java.lang.Exception
When this method completes the handler will be invoked, and the data
will be attached under FORM_DATA
.
The method can either invoke the next handler directly, or may delegate to the IO thread to perform the parsing.
java.lang.Exception
FormData parseBlocking() throws java.io.IOException
parse(io.undertow.server.HttpHandler next)
, as the calling thread should do that
actual parsing, rather than the read threadjava.io.IOException
- If the data could not be readvoid close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
void setCharacterEncoding(java.lang.String encoding)
encoding
- The encodingCopyright © 2018. All rights reserved.