Package io.netty.handler.codec.http
Class HttpObjectDecoder.HeaderParser
- java.lang.Object
-
- io.netty.handler.codec.http.HttpObjectDecoder.HeaderParser
-
- All Implemented Interfaces:
ByteProcessor
- Direct Known Subclasses:
HttpObjectDecoder.LineParser
- Enclosing class:
- HttpObjectDecoder
private static class HttpObjectDecoder.HeaderParser extends java.lang.Object implements ByteProcessor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.util.ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private int
maxLength
private AppendableCharSequence
seq
private int
size
-
Fields inherited from interface io.netty.util.ByteProcessor
FIND_ASCII_SPACE, FIND_COMMA, FIND_CR, FIND_CRLF, FIND_LF, FIND_LINEAR_WHITESPACE, FIND_NON_CR, FIND_NON_CRLF, FIND_NON_LF, FIND_NON_LINEAR_WHITESPACE, FIND_NON_NUL, FIND_NUL, FIND_SEMI_COLON
-
-
Constructor Summary
Constructors Constructor Description HeaderParser(AppendableCharSequence seq, int maxLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
increaseCount()
protected TooLongFrameException
newException(int maxLength)
AppendableCharSequence
parse(ByteBuf buffer)
boolean
process(byte value)
void
reset()
-
-
-
Field Detail
-
seq
private final AppendableCharSequence seq
-
maxLength
private final int maxLength
-
size
private int size
-
-
Constructor Detail
-
HeaderParser
HeaderParser(AppendableCharSequence seq, int maxLength)
-
-
Method Detail
-
parse
public AppendableCharSequence parse(ByteBuf buffer)
-
reset
public void reset()
-
process
public boolean process(byte value) throws java.lang.Exception
- Specified by:
process
in interfaceByteProcessor
- Returns:
true
if the processor wants to continue the loop and handle the next byte in the buffer.false
if the processor wants to stop handling bytes and abort the loop.- Throws:
java.lang.Exception
-
increaseCount
protected final void increaseCount()
-
newException
protected TooLongFrameException newException(int maxLength)
-
-