Package dev.amp.validator.utils
Class ByteUtils
- java.lang.Object
-
- dev.amp.validator.utils.ByteUtils
-
public final class ByteUtils extends Object
Byte utility methods.- Author:
- nhant01, GeorgeLuo
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intbyteLength(String utf8Str)Computes the byte length, rather than character length, of a utf8 string.
-
-
-
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.
-
-