utf8Length

The number of bytes of text in UTF-8, without encoding it. A lone surrogate counts three bytes, the most an encoder writes for it (the replacement character; the JDK's writes ?, one).