@Test void testShort() { assertThrows(IllegalArgumentException.class, () -> { String source = "abc\u10fb"; byte[] bytes = source.getBytes(StandardCharsets.UTF_8); Utf8StringBuilder buffer = new Utf8StringBuilder(); for (int i = 0; i < bytes.length - 1; i++) { buffer.append(bytes[i]); } buffer.toString(); }); }
@Override public String toString() { checkState(); return buffer.toString(); }
Utf8StringBuilder extends Utf8Appendable { @Override public String toString() { checkState(); return buffer.toString(); } }
Utf8StringBuilder extends Utf8Appendable { @Override public String toString() { checkState(); return buffer.toString(); } Utf8StringBuilder();  Utf8StringBuilder(int capacity); }
Utf8StringBuilder extends Utf8Appendable { @Override public String toString() { checkState(); return buffer.toString(); } Utf8StringBuilder();  Utf8StringBuilder(int capacity); @Override int length(); @Override void reset(); StringBuilder getStringBuilder(); @Override String toString(); }
Utf8StringBuilder extends Utf8Appendable { @Override public String toString() { checkState(); return buffer.toString(); } Utf8StringBuilder();  Utf8StringBuilder(int capacity); @Override int length(); @Override void reset(); StringBuilder getStringBuilder(); @Override String toString();  }