code: public static void write( Document bson,
                                OutputStream stream ) throws IOException {
          getBsonWriter().write(bson, stream);
      }
docs: Write to the supplied stream the binary BSON representation of the supplied in-memory {@link Document}.
  
  @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 writing to the stream