code: private void xdr_string(String s) {
      byte[] bytes = s.getBytes();
      int len = bytes.length;
      xdr_int(len);
      System.arraycopy(bytes, 0, buffer, offset, len);
      offset += len;
      pad();
    }
docs: Puts a string into the buffer by first writing the size of the string
  as an int, followed by the bytes of the string, padded if necessary to
  a multiple of 4.