code: void writeTo(OutputStream os) throws IOException
      {
          os.write(DocWriter.getISOBytes(String.valueOf(number)));
          os.write(' ');
          os.write(DocWriter.getISOBytes(String.valueOf(generation)));
          os.write(STARTOBJ);
          object.toPdf(writer, os);
          os.write(ENDOBJ);
      }
docs: Writes efficiently to a stream
  
  @param os the stream to write to
  @throws IOException on write error