private int javaCountBytes(String str) {
        byte[] octets = Utf8.toBytes(str);
        return octets.length;
    }
@author <a href="mailto:borud@yahoo-inc.com">Bjorn Borud</a>
@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java