code: public void toWriter(Writer writer, Properties outputProperties)
          throws TransformerException {
              this.toWriter(true, writer, outputProperties);
          }
docs: Serialize the XML document to the given writer using the default
  {@link TransformerFactory} and {@link Transformer} classes. If output
  options are provided, these options are provided to the
  {@link Transformer} serializer.
  
  @param writer
  a writer to which the serialized document is written.
  @param outputProperties
  settings for the {@link Transformer} serializer. This parameter may be
  null or an empty Properties object, in which case the default output
  properties will be applied.
  
  @throws TransformerException