private void writeString(String s) {
   if (s == null) writeNIL();
   else
     try {
       buf.write(s.getBytes("UTF-8"));
     } catch (IOException e) {
       throw new AssertionError(e);
     }
 }
 private void writeStructuredData() {
   writeNIL(); // no structured data
 }