Class HttpPostStandardRequestDecoder

java.lang.Object
io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder
All Implemented Interfaces:
InterfaceHttpPostRequestDecoder

public class HttpPostStandardRequestDecoder extends java.lang.Object implements InterfaceHttpPostRequestDecoder
This decoder will decode Body and can handle POST BODY. You MUST call destroy() after completion to release all resources.
  • Field Details

    • factory

      private final HttpDataFactory factory
      Factory used to create InterfaceHttpData
    • request

      private final HttpRequest request
      Request to decode
    • charset

      private final java.nio.charset.Charset charset
      Default charset to use
    • maxFields

      private final int maxFields
      The maximum number of fields allows by the form
    • maxBufferedBytes

      private final int maxBufferedBytes
      The maximum number of accumulated bytes when decoding a field
    • isLastChunk

      private boolean isLastChunk
      Does the last chunk already received
    • bodyListHttpData

      private final java.util.List<InterfaceHttpData> bodyListHttpData
      HttpDatas from Body
    • bodyMapHttpData

      private final java.util.Map<java.lang.String, java.util.List<InterfaceHttpData>> bodyMapHttpData
      HttpDatas as Map from Body
    • undecodedChunk

      private ByteBuf undecodedChunk
      The current channelBuffer
    • bodyListHttpDataRank

      private int bodyListHttpDataRank
      Body HttpDatas current position
    • currentStatus

      Current getStatus
    • currentAttribute

      private Attribute currentAttribute
      The current Attribute that is currently in decode process
    • destroyed

      private boolean destroyed
    • discardThreshold

      private int discardThreshold
  • Constructor Details

    • HttpPostStandardRequestDecoder

      public HttpPostStandardRequestDecoder(HttpRequest request)
      Parameters:
      request - the request to decode
      Throws:
      java.lang.NullPointerException - for request
      HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
    • HttpPostStandardRequestDecoder

      public HttpPostStandardRequestDecoder(HttpDataFactory factory, HttpRequest request)
      Parameters:
      factory - the factory used to create InterfaceHttpData
      request - the request to decode
      Throws:
      java.lang.NullPointerException - for request or factory
      HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
    • HttpPostStandardRequestDecoder

      public HttpPostStandardRequestDecoder(HttpDataFactory factory, HttpRequest request, java.nio.charset.Charset charset)
      Parameters:
      factory - the factory used to create InterfaceHttpData
      request - the request to decode
      charset - the charset to use as default
      Throws:
      java.lang.NullPointerException - for request or charset or factory
      HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
    • HttpPostStandardRequestDecoder

      public HttpPostStandardRequestDecoder(HttpDataFactory factory, HttpRequest request, java.nio.charset.Charset charset, int maxFields, int maxBufferedBytes)
      Parameters:
      factory - the factory used to create InterfaceHttpData
      request - the request to decode
      charset - the charset to use as default
      maxFields - the maximum number of fields the form can have, -1 to disable
      maxBufferedBytes - the maximum number of bytes the decoder can buffer when decoding a field, -1 to disable
      Throws:
      java.lang.NullPointerException - for request or charset or factory
      HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
  • Method Details