code: public boolean isDone() {
          return status == Status.cancelled || status == Status.error
                  || status == Status.complete || status == Status.refused;
      }
docs: Returns true if the transfer has been cancelled, if it has stopped because
  of a an error, or the transfer completed successfully.
  
  @return Returns true if the transfer has been cancelled, if it has stopped
  because of a an error, or the transfer completed successfully.