code: private int writeString(String str) {
          int length = 0;
          try {
              byte[] buf = str.getBytes("ISO-8859-1");
              System.arraycopy(buf, 0, output, currentPos, buf.length);
              length = buf.length;
              currentPos += length;
          } catch (UnsupportedEncodingException e) {
              // This should never happen!
          }
  
          return length;
      }
docs: writes a ISO-8859-1 string at the currentPosition
  updates currentPosition but not realSize
  @return number of bytes written
  
  @param str Write a string at the current position