public void writeString(String str) throws TException {
byte[] dat;
try {
dat = str.getBytes("UTF-8");
} catch (UnsupportedEncodingException uex) {
throw new TException("JVM DOES NOT SUPPORT UTF-8: " + uex.getMessage());
}
writeRawBytes(nonNullByte, 0, 1);
int begin = 0;
int i = 0;
for (; i < dat.length; i++) {