private void checkUTF8String(Channel channel, byte[] bytes) throws CorruptedFrameException { try { if (utf8Validator == null) { utf8Validator = new Utf8Validator(); } utf8Validator.check(bytes); } catch (CorruptedFrameException ex) { protocolViolation(channel, ex); } }
public void check(byte[] bytes) throws CorruptedFrameException { checking = true; for (byte b : bytes) { write(b); } }
if (frameOpcode == OPCODE_TEXT || (utf8Validator != null && utf8Validator.isChecking())) { utf8Validator.finish(); if (utf8Validator != null && utf8Validator.isChecking()) { checkUTF8String(channel, framePayload.array());
buffer.readBytes(b); try { Utf8Validator validator = new Utf8Validator(); validator.check(b); } catch (CorruptedFrameException ex) { protocolViolation(channel, ex);