public class HttpPostStandardRequestDecoder extends Object implements InterfaceHttpPostRequestDecoder
Constructor and Description |
---|
HttpPostStandardRequestDecoder(HttpDataFactory factory,
HttpRequest request) |
HttpPostStandardRequestDecoder(HttpDataFactory factory,
HttpRequest request,
Charset charset) |
HttpPostStandardRequestDecoder(HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
void |
cleanFiles()
Clean all HttpDatas (on Disk) for the current request.
|
InterfaceHttpData |
getBodyHttpData(String name)
This method returns the first InterfaceHttpData with the given name from body.
|
List<InterfaceHttpData> |
getBodyHttpDatas()
This method returns a List of all HttpDatas from body.
|
List<InterfaceHttpData> |
getBodyHttpDatas(String name)
This method returns a List of all HttpDatas with the given name from body.
|
boolean |
hasNext()
True if at current status, there is an available decoded InterfaceHttpData from the Body.
|
boolean |
isMultipart()
True if this request is a Multipart request
|
InterfaceHttpData |
next()
Returns the next available InterfaceHttpData or null if, at the time it is called, there is no more
available InterfaceHttpData.
|
void |
offer(HttpChunk chunk)
Initialized the internals from a new chunk
|
void |
removeHttpDataFromClean(InterfaceHttpData data)
Remove the given FileUpload from the list of FileUploads to clean
|
public HttpPostStandardRequestDecoder(HttpRequest request) throws HttpPostRequestDecoder.ErrorDataDecoderException
request
- the request to decodeNullPointerException
- for requestHttpPostRequestDecoder.ErrorDataDecoderException
- if the default charset was wrong when decoding or other errorspublic HttpPostStandardRequestDecoder(HttpDataFactory factory, HttpRequest request) throws HttpPostRequestDecoder.ErrorDataDecoderException
factory
- the factory used to create InterfaceHttpDatarequest
- the request to decodeNullPointerException
- for request or factoryHttpPostRequestDecoder.ErrorDataDecoderException
- if the default charset was wrong when decoding or other errorspublic HttpPostStandardRequestDecoder(HttpDataFactory factory, HttpRequest request, Charset charset) throws HttpPostRequestDecoder.ErrorDataDecoderException
factory
- the factory used to create InterfaceHttpDatarequest
- the request to decodecharset
- the charset to use as defaultNullPointerException
- for request or charset or factoryHttpPostRequestDecoder.ErrorDataDecoderException
- if the default charset was wrong when decoding or other errorspublic boolean isMultipart()
InterfaceHttpPostRequestDecoder
isMultipart
in interface InterfaceHttpPostRequestDecoder
public List<InterfaceHttpData> getBodyHttpDatas() throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecoder
getBodyHttpDatas
in interface InterfaceHttpPostRequestDecoder
HttpPostRequestDecoder.NotEnoughDataDecoderException
- Need more chunkspublic List<InterfaceHttpData> getBodyHttpDatas(String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecoder
getBodyHttpDatas
in interface InterfaceHttpPostRequestDecoder
HttpPostRequestDecoder.NotEnoughDataDecoderException
- need more chunkspublic InterfaceHttpData getBodyHttpData(String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecoder
getBodyHttpData
in interface InterfaceHttpPostRequestDecoder
HttpPostRequestDecoder.NotEnoughDataDecoderException
- need more chunkspublic void offer(HttpChunk chunk) throws HttpPostRequestDecoder.ErrorDataDecoderException
InterfaceHttpPostRequestDecoder
offer
in interface InterfaceHttpPostRequestDecoder
chunk
- the new received chunkHttpPostRequestDecoder.ErrorDataDecoderException
- if there is a problem with the charset decoding or
other errorspublic boolean hasNext() throws HttpPostRequestDecoder.EndOfDataDecoderException
InterfaceHttpPostRequestDecoder
hasNext
in interface InterfaceHttpPostRequestDecoder
HttpPostRequestDecoder.EndOfDataDecoderException
- No more data will be availablepublic InterfaceHttpData next() throws HttpPostRequestDecoder.EndOfDataDecoderException
InterfaceHttpPostRequestDecoder
next
in interface InterfaceHttpPostRequestDecoder
HttpPostRequestDecoder.EndOfDataDecoderException
- No more data will be availablepublic void cleanFiles()
InterfaceHttpPostRequestDecoder
cleanFiles
in interface InterfaceHttpPostRequestDecoder
public void removeHttpDataFromClean(InterfaceHttpData data)
InterfaceHttpPostRequestDecoder
removeHttpDataFromClean
in interface InterfaceHttpPostRequestDecoder
Copyright © 2008-2016 The Netty Project. All Rights Reserved.