Lines Matching defs:sequence
41 * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string,
45 * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired
48 public static int encodedLength(CharSequence sequence) {
50 int utf16Length = sequence.length();
55 while (i < utf16Length && sequence.charAt(i) < 0x80) {
61 char c = sequence.charAt(i);
65 utf8Length += encodedLengthGeneral(sequence, i);
78 private static int encodedLengthGeneral(CharSequence sequence, int start) {
79 int utf16Length = sequence.length();
82 char c = sequence.charAt(i);
90 int cp = Character.codePointAt(sequence, i);
102 * Returns {@code true} if {@code bytes} is a <i>well-formed</i> UTF-8 byte sequence according to
116 * Returns whether the given byte array slice is a well-formed UTF-8 byte sequence, as defined by