public class HttpPostMultipartRequestDecoder extends java.lang.Object implements InterfaceHttpPostRequestDecoder
| 构造器和说明 |
|---|
HttpPostMultipartRequestDecoder(HttpDataFactory factory,
HttpRequest request) |
HttpPostMultipartRequestDecoder(HttpDataFactory factory,
HttpRequest request,
java.nio.charset.Charset charset) |
HttpPostMultipartRequestDecoder(HttpRequest request) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cleanFiles()
Clean all HttpDatas (on Disk) for the current request.
|
InterfaceHttpData |
getBodyHttpData(java.lang.String name)
This method returns the first InterfaceHttpData with the given name from body.
|
java.util.List<InterfaceHttpData> |
getBodyHttpDatas()
This method returns a List of all HttpDatas from body.
|
java.util.List<InterfaceHttpData> |
getBodyHttpDatas(java.lang.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 HttpPostMultipartRequestDecoder(HttpRequest request) throws HttpPostRequestDecoder.ErrorDataDecoderException
request - the request to decodejava.lang.NullPointerException - for requestHttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errorspublic HttpPostMultipartRequestDecoder(HttpDataFactory factory, HttpRequest request) throws HttpPostRequestDecoder.ErrorDataDecoderException
factory - the factory used to create InterfaceHttpDatarequest - the request to decodejava.lang.NullPointerException - for request or factoryHttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errorspublic HttpPostMultipartRequestDecoder(HttpDataFactory factory, HttpRequest request, java.nio.charset.Charset charset) throws HttpPostRequestDecoder.ErrorDataDecoderException
factory - the factory used to create InterfaceHttpDatarequest - the request to decodecharset - the charset to use as defaultjava.lang.NullPointerException - for request or charset or factoryHttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errorspublic boolean isMultipart()
InterfaceHttpPostRequestDecoderisMultipart 在接口中 InterfaceHttpPostRequestDecoderpublic java.util.List<InterfaceHttpData> getBodyHttpDatas() throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecodergetBodyHttpDatas 在接口中 InterfaceHttpPostRequestDecoderHttpPostRequestDecoder.NotEnoughDataDecoderException - Need more chunkspublic java.util.List<InterfaceHttpData> getBodyHttpDatas(java.lang.String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecodergetBodyHttpDatas 在接口中 InterfaceHttpPostRequestDecoderHttpPostRequestDecoder.NotEnoughDataDecoderException - need more chunkspublic InterfaceHttpData getBodyHttpData(java.lang.String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
InterfaceHttpPostRequestDecodergetBodyHttpData 在接口中 InterfaceHttpPostRequestDecoderHttpPostRequestDecoder.NotEnoughDataDecoderException - need more chunkspublic void offer(HttpChunk chunk) throws HttpPostRequestDecoder.ErrorDataDecoderException
InterfaceHttpPostRequestDecoderoffer 在接口中 InterfaceHttpPostRequestDecoderchunk - the new received chunkHttpPostRequestDecoder.ErrorDataDecoderException - if there is a problem with the charset decoding or
other errorspublic boolean hasNext()
throws HttpPostRequestDecoder.EndOfDataDecoderException
InterfaceHttpPostRequestDecoderhasNext 在接口中 InterfaceHttpPostRequestDecoderHttpPostRequestDecoder.EndOfDataDecoderException - No more data will be availablepublic InterfaceHttpData next() throws HttpPostRequestDecoder.EndOfDataDecoderException
InterfaceHttpPostRequestDecodernext 在接口中 InterfaceHttpPostRequestDecoderHttpPostRequestDecoder.EndOfDataDecoderException - No more data will be availablepublic void cleanFiles()
InterfaceHttpPostRequestDecodercleanFiles 在接口中 InterfaceHttpPostRequestDecoderpublic void removeHttpDataFromClean(InterfaceHttpData data)
InterfaceHttpPostRequestDecoder