public static int writeString(DataOutput out,String s) throws IOException {
  ByteBuffer bytes=encode(s);
  int length=bytes.limit();
  WritableUtils.writeVInt(out,length);
  out.write(bytes.array(),0,length);
  return length;
}

public static int writeString ( DataOutput out , String s ) throws IOException { ByteBuffer bytes = encode ( s ) ; int length = bytes . limit ( ) ; WritableUtils . writeVInt ( out , length ) ; out . write ( bytes . array ( ) , 0 , length ) ; return length ; }
write a utf8 encoded string to out
