code: public final synchronized boolean isDone() {
          return (state == TransferState.Failed ||
                  state == TransferState.Completed ||
                  state == TransferState.Canceled);
      }
docs: Returns whether or not the transfer is finished (i.e. completed successfully,
  failed, or was canceled).  This method should never block.
  
  @return Returns <code>true</code> if this transfer is finished (i.e. completed successfully,
  failed, or was canceled).  Returns <code>false</code> if otherwise.