code: public Document read( DataInput input ) throws IOException {
          // Create an object so that this reader is thread safe ...
          DocumentValueFactory valueFactory = VALUE_FACTORY;
          Reader reader = new Reader(new BsonDataInput(input), valueFactory);
          reader.startDocument();
          return reader.endDocument();
      }
docs: Read the binary BSON representation from supplied input stream and construct the {@link Document} representation.
  
  @param input the input stream; may not be null
  @return the in-memory {@link Document} representation
  @throws IOException if there was a problem reading from the stream