Here's another minor performance tweak to public String(int[] codePoints, int offset, int count) {
that optimizes for BMP. // Pass 1: Compute precise size of char[] int n = count; for (int i = offset; i < end; i++) { int c = codePoints[i]; if (Character.isBMPCodePoint(c)) ; else if (Character.isSupplementaryCodePoint(c)) n++; else throw new IllegalArgumentException(Integer.toString(c)); } http://cr.openjdk.java.net/~martin/webrevs/openjdk7/public-isBMPCodePoint/ Martin