Class Utf8Validator
- java.lang.Object
-
- org.jboss.netty.handler.codec.http.websocketx.Utf8Validator
-
final class Utf8Validator extends java.lang.Object
Checks UTF8 bytes for validity before converting it into a string
-
-
Field Summary
Fields Modifier and Type Field 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
-
Constructor Summary
Constructors Constructor Description Utf8Validator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check(byte[] bytes)
void
finish()
boolean
isChecking()
private void
write(int b)
-
-
-
Field Detail
-
UTF8_ACCEPT
private static final int UTF8_ACCEPT
- See Also:
- Constant Field Values
-
UTF8_REJECT
private static final int UTF8_REJECT
- See Also:
- Constant Field Values
-
TYPES
private static final byte[] TYPES
-
STATES
private static final byte[] STATES
-
state
private int state
-
codep
private int codep
-
checking
private boolean checking
-
-
Method Detail
-
check
public void check(byte[] bytes) throws CorruptedFrameException
- Throws:
CorruptedFrameException
-
write
private void write(int b) throws CorruptedFrameException
- Throws:
CorruptedFrameException
-
finish
public void finish() throws CorruptedFrameException
- Throws:
CorruptedFrameException
-
isChecking
public boolean isChecking()
-
-