static ByteString toBytes(String str){
  try {
    return ByteString.copyFrom(str.getBytes("UTF-8"));
  }
 catch (  java.io.UnsupportedEncodingException e) {
    throw new RuntimeException("UTF-8 not supported.",e);
  }
}

static ByteString toBytes ( String str ) { try { return ByteString . copyFrom ( str . getBytes ( "UTF-8" ) ) ; } catch ( java . io . UnsupportedEncodingException e ) { throw new RuntimeException ( "UTF-8 not supported." , e ) ; } }
helper to convert a string to bytestring .
