Class HttpPostBodyUtil.SeekAheadOptimize

  • Enclosing class:
    HttpPostBodyUtil

    static class HttpPostBodyUtil.SeekAheadOptimize
    extends java.lang.Object
    This class intends to decrease the CPU in seeking ahead some bytes in HttpPostRequestDecoder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) ChannelBuffer buffer  
      (package private) byte[] bytes  
      (package private) int limit  
      (package private) int origPos  
      (package private) int pos  
      (package private) int readerIndex  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void clear()  
      (package private) int getReadPosition​(int index)  
      (package private) void setReadPosition​(int minus)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bytes

        byte[] bytes
      • readerIndex

        int readerIndex
      • pos

        int pos
      • origPos

        int origPos
      • limit

        int limit
    • Method Detail

      • setReadPosition

        void setReadPosition​(int minus)
        Parameters:
        minus - this value will be used as (currentPos - minus) to set the current readerIndex in the buffer.
      • getReadPosition

        int getReadPosition​(int index)
        Parameters:
        index - raw index of the array (pos in general)
        Returns:
        the value equivalent of raw index to be used in readerIndex(value)
      • clear

        void clear()