Class ByteUtils


  • public final class ByteUtils
    extends Object
    Byte utility methods.
    Author:
    nhant01, GeorgeLuo
    • Method Detail

      • byteLength

        public static int byteLength​(@Nonnull
                                     String utf8Str)
        Computes the byte length, rather than character length, of a utf8 string. https://en.wikipedia.org/wiki/UTF-8
        Parameters:
        utf8Str - UTF-8 string.
        Returns:
        returns the byte length.