destroy() after completion to release all resources.
| Modifier and Type | Class and Description |
|---|---|
| public static class | HttpPostRequestDecoder.EndOfDataDecoderException
Exception when the body is fully decoded, even if there is still data |
| public static class | HttpPostRequestDecoder.ErrorDataDecoderException
Exception when an error occurs while decoding |
| protected static enum | HttpPostRequestDecoder.MultiPartStatus
states follow NOTSTARTED PREAMBLE ( (HEADERDELIMITER DISPOSITION (FIELD | FILEUPLOAD))* (HEADERDELIMITER DISPOSITION MIXEDPREAMBLE (MIXEDDELIMITER MIXEDDISPOSITION MIXEDFILEUPLOAD)+ MIXEDCLOSEDELIMITER)* CLOSEDELIMITER)+ EPILOGUE First getStatus is: NOSTARTED Content-type: multipart/form-data, boundary=AaB03x => PREAMBLE in Header --AaB03x => HEADERDELIMITER content-disposition: form-data; name="field1" => DISPOSITION Joe Blow => FIELD --AaB03x => HEADERDELIMITER content-disposition: form-data; name="pics" => DISPOSITION Content-type: multipart/mixed, boundary=BbC04y --BbC04y => MIXEDDELIMITER Content-disposition: attachment; filename="file1.txt" => MIXEDDISPOSITION Content-Type: text/plain ... |
| public static class | HttpPostRequestDecoder.NotEnoughDataDecoderException
Exception when try reading data from request in chunked format, and not enough data are available (need more chunks) |
| Modifier and Type | Field and Description |
|---|---|
| private final InterfaceHttpPostRequestDecoder | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | HttpPostRequestDecoder(HttpDataFactory
the factory used to create InterfaceHttpData factory, HttpRequest the request to decode request)
|
| public | HttpPostRequestDecoder(HttpDataFactory
the factory used to create InterfaceHttpData factory, HttpRequest the request to decode request, Charset the charset to use as default charset)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanFiles()
Implements io. |
| public InterfaceHttpData | currentPartialHttpData()
Implements io. |
| public void | destroy()
Implements io. InterfaceHttpPostRequestDecoder and release all it resources.
|
| public InterfaceHttpData | getBodyHttpData(String name)
Implements io. |
| public List | getBodyHttpDatas()
Implements io. |
| public List | getBodyHttpDatas(String name)
Implements io. |
| public int | getDiscardThreshold()
Implements io. |
| protected static String[] | Returns: an array of String if multipartDataBoundary exists with the multipartDataBoundary as first element, charset if any as second (missing if not set), else nullCheck from the request ContentType if this request is a Multipart request. |
| public boolean | hasNext()
Implements io. |
| public static boolean | Returns: True if the request is a Multipart requestCheck if the given request is a multipart request |
| public boolean | isMultipart()
Implements io. |
| public InterfaceHttpData | next()
Implements io. |
| public InterfaceHttpPostRequestDecoder | offer(HttpContent
the new received chunk content)Implements io. |
| public void | removeHttpDataFromClean(InterfaceHttpData data)
Implements io. |
| public void | setDiscardThreshold(int discardThreshold)
Implements io. |
| private static String[] | Returns: the array of 3 StringsSplit the very first line (Content-Type value) in 3 Strings |
| decoder | back to summary |
|---|---|
| private final InterfaceHttpPostRequestDecoder decoder | |
| DEFAULT_DISCARD_THRESHOLD | back to summary |
|---|---|
| pack-priv static final int DEFAULT_DISCARD_THRESHOLD | |
| HttpPostRequestDecoder | back to summary |
|---|---|
public HttpPostRequestDecoder(HttpRequest request)
| |
| HttpPostRequestDecoder | back to summary |
|---|---|
public HttpPostRequestDecoder(HttpDataFactory factory, HttpRequest request)
| |
| HttpPostRequestDecoder | back to summary |
|---|---|
public HttpPostRequestDecoder(HttpDataFactory factory, HttpRequest request, Charset charset)
| |
| cleanFiles | back to summary |
|---|---|
| public void cleanFiles() Implements io. Doc from io. Clean all HttpDatas (on Disk) for the current request.
| |
| currentPartialHttpData | back to summary |
|---|---|
| public InterfaceHttpData currentPartialHttpData() Implements io. Doc from io. Returns the current InterfaceHttpData if currently in decoding status, meaning all data are not yet within, or null if there is no InterfaceHttpData currently in decoding status (either because none yet decoded or none currently partially decoded). Full decoded ones are accessible through hasNext() and next() methods.
| |
| destroy | back to summary |
|---|---|
| public void destroy() Implements io. Doc from io. Destroy the
| |
| getBodyHttpData | back to summary |
|---|---|
| public InterfaceHttpData getBodyHttpData(String name) Implements io. Doc from io. This getMethod returns the first InterfaceHttpData with the given name from
body.
| |
| getBodyHttpDatas | back to summary |
|---|---|
| public List Implements io. Doc from io. This getMethod returns a List of all HttpDatas from body.
| |
| getBodyHttpDatas | back to summary |
|---|---|
| public List Implements io. Doc from io. This getMethod returns a List of all HttpDatas with the given name from
body.
| |
| getDiscardThreshold | back to summary |
|---|---|
| public int getDiscardThreshold() Implements io. Doc from io. Return the threshold in bytes after which read data in the buffer should be discarded.
| |
| getMultipartDataBoundary | back to summary |
|---|---|
| protected static String[] getMultipartDataBoundary(String contentType) Check from the request ContentType if this request is a Multipart request.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements io. Doc from io. True if at current getStatus, there is an available decoded InterfaceHttpData from the Body. This getMethod works for chunked and not chunked request.
| |
| isMultipart | back to summary |
|---|---|
| public static boolean isMultipart(HttpRequest request) Check if the given request is a multipart request
| |
| isMultipart | back to summary |
|---|---|
| public boolean isMultipart() Implements io. Doc from io. True if this request is a Multipart request
| |
| next | back to summary |
|---|---|
| public InterfaceHttpData next() Implements io. Doc from io. Returns the next available InterfaceHttpData or null if, at the time it
is called, there is no more available InterfaceHttpData. A subsequent
call to offer(httpChunk) could enable more data.
Be sure to call
| |
| offer | back to summary |
|---|---|
| public InterfaceHttpPostRequestDecoder offer(HttpContent content) Implements io. Doc from io. Initialized the internals from a new chunk
| |
| removeHttpDataFromClean | back to summary |
|---|---|
| public void removeHttpDataFromClean(InterfaceHttpData data) Implements io. Doc from io. Remove the given FileUpload from the list of FileUploads to clean
| |
| setDiscardThreshold | back to summary |
|---|---|
| public void setDiscardThreshold(int discardThreshold) Implements io. Doc from io. Set the amount of bytes after which read bytes in the buffer should be discarded.
Setting this lower gives lower memory usage but with the overhead of more memory copies.
Use
| |
| splitHeaderContentType | back to summary |
|---|---|
| private static String[] splitHeaderContentType(String sb) Split the very first line (Content-Type value) in 3 Strings
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides io. | |
| EndOfDataDecoderException | back to summary |
|---|---|
| public EndOfDataDecoderException() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides io. | |
| ErrorDataDecoderException | back to summary |
|---|---|
| public ErrorDataDecoderException() | |
| ErrorDataDecoderException | back to summary |
|---|---|
| public ErrorDataDecoderException(String msg) | |
| ErrorDataDecoderException | back to summary |
|---|---|
| public ErrorDataDecoderException(Throwable cause) | |
| ErrorDataDecoderException | back to summary |
|---|---|
| public ErrorDataDecoderException(String msg, Throwable cause) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. | |
| public static final HttpPostRequestDecoder. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpPostRequestDecoder. | |
| public static HttpPostRequestDecoder. |
| CLOSEDELIMITER | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| DISPOSITION | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| EPILOGUE | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| FIELD | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| FILEUPLOAD | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| HEADERDELIMITER | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MIXEDCLOSEDELIMITER | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MIXEDDELIMITER | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MIXEDDISPOSITION | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MIXEDFILEUPLOAD | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MIXEDPREAMBLE | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| NOTSTARTED | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| PREAMBLE | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| PREEPILOGUE | back to summary |
|---|---|
| public static final HttpPostRequestDecoder. | |
| MultiPartStatus | back to summary |
|---|---|
| private MultiPartStatus() | |
| valueOf | back to summary |
|---|---|
| public static HttpPostRequestDecoder. | |
| values | back to summary |
|---|---|
| public static HttpPostRequestDecoder. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides io. | |
| NotEnoughDataDecoderException | back to summary |
|---|---|
| public NotEnoughDataDecoderException() | |
| NotEnoughDataDecoderException | back to summary |
|---|---|
| public NotEnoughDataDecoderException(String msg) | |
| NotEnoughDataDecoderException | back to summary |
|---|---|
| public NotEnoughDataDecoderException(Throwable cause) | |
| NotEnoughDataDecoderException | back to summary |
|---|---|
| public NotEnoughDataDecoderException(String msg, Throwable cause) | |