encodedLength

Returns the number of bytes in the UTF-8-encoded form of sequence. For a string, this method is equivalent to string.getBytes(UTF_8).length, but is more efficient in both time and space.

Throws

if sequence contains ill-formed UTF-16 (unpaired surrogates)