code: public List<GridFSDBFile> find(final DBObject query, final DBObject sort) {
          List<GridFSDBFile> files = new ArrayList<GridFSDBFile>();
  
          DBCursor cursor = filesCollection.find(query);
          if (sort != null) {
              cursor.sort(sort);
          }
  
          try {
              while (cursor.hasNext()) {
                  files.add(injectGridFSInstance(cursor.next()));
              }
          } finally {
              cursor.close();
          }
          return Collections.unmodifiableList(files);
      }
docs: Finds a list of files matching the given query.
  
  @param query the filter to apply
  @param sort  the fields to sort with
  @return list of gridfs files
  @throws com.mongodb.MongoException if the operation fails