Class Utf8Validator
java.lang.Object
io.netty.handler.codec.http.websocketx.Utf8Validator
- All Implemented Interfaces:
ByteProcessor
Checks UTF8 bytes for validity
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.util.ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
private int
private static final byte[]
private static final byte[]
private static final int
private static final int
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 -
Method Summary
-
Field Details
-
UTF8_ACCEPT
private static final int UTF8_ACCEPT- See Also:
-
UTF8_REJECT
private static final int UTF8_REJECT- See Also:
-
TYPES
private static final byte[] TYPES -
STATES
private static final byte[] STATES -
state
private int state -
codep
private int codep -
checking
private boolean checking
-
-
Constructor Details
-
Utf8Validator
Utf8Validator()
-
-
Method Details
-
check
-
check
-
finish
public void finish() -
process
- 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:
Exception
-
isChecking
public boolean isChecking()
-