Package io.netty.handler.codec.stomp
Class StompSubframeDecoder.Utf8LineParser
- java.lang.Object
-
- io.netty.handler.codec.stomp.StompSubframeDecoder.Utf8LineParser
-
- All Implemented Interfaces:
ByteProcessor
- Direct Known Subclasses:
StompSubframeDecoder.HeaderParser
- Enclosing class:
- StompSubframeDecoder
private static class StompSubframeDecoder.Utf8LineParser 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 AppendableCharSequence
charSeq
private char
interim
private int
lineLength
private int
maxLineLength
private boolean
nextRead
-
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 Utf8LineParser(AppendableCharSequence charSeq, int maxLineLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) AppendableCharSequence
charSequence()
(package private) AppendableCharSequence
parse(ByteBuf byteBuf)
boolean
process(byte nextByte)
protected void
reset()
-
-
-
Field Detail
-
charSeq
private final AppendableCharSequence charSeq
-
maxLineLength
private final int maxLineLength
-
lineLength
private int lineLength
-
interim
private char interim
-
nextRead
private boolean nextRead
-
-
Constructor Detail
-
Utf8LineParser
Utf8LineParser(AppendableCharSequence charSeq, int maxLineLength)
-
-
Method Detail
-
parse
AppendableCharSequence parse(ByteBuf byteBuf)
-
charSequence
AppendableCharSequence charSequence()
-
process
public boolean process(byte nextByte) 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
-
reset
protected void reset()
-
-