Class UTF8Validator


  • public class UTF8Validator
    extends Object
    Utility class to check the validity of an UTF8 message.
    • Method Detail

      • isValid

        public static boolean isValid​(byte[] bytes,
                                      int offset,
                                      int length)
        Checks the validity of UTF8 array of bytes.
        Parameters:
        bytes - the bytes array to check.
        offset - the offset to start the validity.
        length - the length to check.
        Returns:
        true if the array contains only valid UTF8 code.