docs: @Override
    public void download(SFSession connection,
                         String command,
                         String localLocation,
                         String destFileName,
                         int parallelism,
                         String remoteStorageLocation,
                         String stageFilePath,
                         String stageRegion) throws SnowflakeSQLException
    {
      TransferManager tx = null;
      int retryCount = 0;
      do
      {
        try
        {
          File localFile = new File(localLocation + localFileSep + destFileName);
  
          logger.debug("Creating executor service for transfer" +
                       "manager with {} threads", parallelism);
  
          // download file from s3
          tx = new TransferManager(amazonClient,
                                   SnowflakeUtil.createDefaultExecutorService(
                                       "s3-transfer-manager-downloader-", parallelism));
  
          Download myDownload = tx.download(remoteStorageLocation,
                                            stageFilePath, localFile);
  
          // Pull object metadata from S3
          ObjectMetadata meta =
              amazonClient.getObjectMetadata(remoteStorageLocation, stageFilePath);
  
          Map<String, String> metaMap = meta.getUserMetadata();
          String key = metaMap.get(AMZ_KEY);
          String iv = metaMap.get(AMZ_IV);
  
          myDownload.waitForCompletion();
  
          if (this.isEncrypting() && this.getEncryptionKeySize() < 256)
          {
            if (key == null || iv == null)
            {
              throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,
                                              ErrorCode.INTERNAL_ERROR.getMessageCode(),
                                              "File metadata incomplete");
            }
  
            // Decrypt file
            try
            {
              EncryptionProvider.decrypt(localFile, key, iv, this.encMat);
            }
            catch (Exception ex)
            {
              logger.error("Error decrypting file", ex);
              throw ex;
            }
          }
  
          return;
  
        }
        catch (Exception ex)
        {
          handleS3Exception(ex, ++retryCount, "download",
                            connection, command, this);
  
        }
        finally
        {
          if (tx != null)
          {
            tx.shutdownNow(false);
          }
        }
      }
      while (retryCount <= getMaxRetries());
  
      throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,
                                      ErrorCode.INTERNAL_ERROR.getMessageCode(),
                                      "Unexpected: download unsuccessful without exception!");
    }