Class Utf8Validator

java.lang.Object
io.netty.handler.codec.http.websocketx.Utf8Validator
All Implemented Interfaces:
ByteProcessor

final class Utf8Validator extends Object implements ByteProcessor
Checks UTF8 bytes for validity
  • 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

      public void check(ByteBuf buffer)
    • check

      void check(ByteBuf buffer, int index, int length)
    • finish

      public void finish()
    • process

      public boolean process(byte b) throws Exception
      Specified by:
      process in interface ByteProcessor
      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()