docs: private static void writeString(String str, DataOutput writer) throws IOException {
  		if (str == null) {
  			writer.writeInt(0);
  		} else {
  			int blocks = str.length() >> 15;
  			writer.writeInt(blocks+1);
  			int end = 0;
  			for (int i=0; i<blocks; i++) {
  				int start = end;
  				end = (i+1)<<15;
  				writer.writeUTF(str.substring(start, end));
  			}
  			writer.writeUTF(str.substring(end));
  		}
  	}