code: public void write(Bean bean, OutputStream output) throws IOException {
          write(bean, true, output);
      }
docs: Writes the bean to the {@code OutputStream}.
  <p>
  The type of the bean will be set in the message.
  
  @param bean  the bean to output, not null
  @param output  the output stream, not null
  @throws IOException if an error occurs