Class HttpPostBodyUtil.SeekAheadOptimize
java.lang.Object
org.jboss.netty.handler.codec.http.multipart.HttpPostBodyUtil.SeekAheadOptimize
- Enclosing class:
HttpPostBodyUtil
This class intends to decrease the CPU in seeking ahead some bytes in
HttpPostRequestDecoder
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ChannelBuffer
(package private) byte[]
(package private) int
(package private) int
(package private) int
(package private) int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
clear()
(package private) int
getReadPosition
(int index) (package private) void
setReadPosition
(int minus)
-
Field Details
-
bytes
byte[] bytes -
readerIndex
int readerIndex -
pos
int pos -
origPos
int origPos -
limit
int limit -
buffer
ChannelBuffer buffer
-
-
Constructor Details
-
SeekAheadOptimize
SeekAheadOptimize(ChannelBuffer buffer) throws HttpPostBodyUtil.SeekAheadNoBackArrayException
-
-
Method Details
-
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()
-