final class Utf8Validator extends java.lang.Object implements ByteBufProcessor
Modifier and Type | Field and Description |
---|---|
private boolean |
checking |
private int |
codep |
private int |
state |
private static byte[] |
STATES |
private static byte[] |
TYPES |
private static int |
UTF8_ACCEPT |
private static int |
UTF8_REJECT |
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
Constructor and Description |
---|
Utf8Validator() |
Modifier and Type | Method and Description |
---|---|
void |
check(ByteBuf buffer) |
void |
finish() |
boolean |
isChecking() |
boolean |
process(byte b) |
private static final int UTF8_ACCEPT
private static final int UTF8_REJECT
private static final byte[] TYPES
private static final byte[] STATES
private int state
private int codep
private boolean checking
public void check(ByteBuf buffer)
public void finish()
public boolean process(byte b) throws java.lang.Exception
process
in interface ByteBufProcessor
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.java.lang.Exception
public boolean isChecking()