Class Utf8Validator
- java.lang.Object
-
- org.jboss.netty.handler.codec.http.websocketx.Utf8Validator
-
final class Utf8Validator extends java.lang.ObjectChecks UTF8 bytes for validity before converting it into a string
-
-
Field Summary
Fields Modifier and Type Field Description private booleancheckingprivate intcodepprivate intstateprivate static byte[]STATESprivate static byte[]TYPESprivate static intUTF8_ACCEPTprivate static intUTF8_REJECT
-
Constructor Summary
Constructors Constructor Description Utf8Validator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck(byte[] bytes)voidfinish()booleanisChecking()private voidwrite(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()
-
-