driver-legacy/src/main/com/mongodb/DB.java
public CommandResult command(final DBObject command, final DBEncoder encoder) {
        return command(command, getReadPreference(), encoder);
    }
public CommandResult command(final DBObject command, final DBEncoder encoder) {
        return command(command, getReadPreference(), encoder);
    }
Executes a database command. This method calls {@link DB#command(DBObject, ReadPreference, DBEncoder) } with the default read
preference for the database.

@param command {@code DBObject} representation of the command to be executed
@param encoder {@link DBEncoder} to be used for command encoding
@return result of the command execution
@throws MongoException if the command failed
@mongodb.driver.manual tutorial/use-database-commands Commands