code: public static void writePretty( Document bson,
                                      OutputStream stream ) throws IOException {
          getPrettyWriter().write(bson, stream);
      }
docs: Write to the supplied writer the modified JSON representation of the supplied in-memory {@link Document}. The resulting
  JSON will be indented for each name/value pair and each array value.
  <p>
  This format is very readable by people and software, but is less compact due to the extra whitespace.
  </p>
  
  @param bson the BSON object or BSON value; may not be null
  @param stream the output stream; may not be null
  @throws IOException if there was a problem reading from the stream