类 DownloadFileRequest


public class DownloadFileRequest extends BaseObjectRequest
Parameters in a request for downloading a file
  • 构造器详细资料

    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
      partSize - Part size
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
      partSize - Part size
      taskNum - Maximum number of threads used for processing download tasks concurrently
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
      partSize - Part size
      taskNum - Maximum number of threads used for processing download tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
      partSize - Part size
      taskNum - Maximum number of threads used for processing download tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
      checkpointFile - File used to record download progresses in resumable mode
    • DownloadFileRequest

      public DownloadFileRequest(String bucketName, String objectKey, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile, String versionId)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      downloadFile - Path to the to-be-downloaded file
      partSize - Part size
      taskNum - Maximum number of threads used for processing download tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
      checkpointFile - File used to record download progresses in resumable mode
      versionId - Version ID of the object
  • 方法详细资料

    • getDownloadFile

      public String getDownloadFile()
      Obtain the path to the to-be-downloaded file.
      返回:
      Path to the to-be-downloaded file
    • setDownloadFile

      public void setDownloadFile(String downloadFile)
      Set the path to the to-be-downloaded file.
      参数:
      downloadFile - Path to the to-be-downloaded file
    • getPartSize

      public long getPartSize()
      Obtain the part size.
      返回:
      Part size
    • setPartSize

      public void setPartSize(long partSize)
      Set the part size.
      参数:
      partSize - Part size
    • getTaskNum

      public int getTaskNum()
      Obtain the maximum number of threads used for processing download tasks concurrently.
      返回:
      Maximum number of threads used for processing download tasks concurrently
    • setTaskNum

      public void setTaskNum(int taskNum)
      Set the maximum number of threads used for processing download tasks concurrently.
      参数:
      taskNum - Maximum number of threads used for processing download tasks concurrently
    • isEnableCheckpoint

      public boolean isEnableCheckpoint()
      Identify whether the resumable mode is enabled.
      返回:
      Identifier specifying whether the resumable mode is enabled
    • setEnableCheckpoint

      public void setEnableCheckpoint(boolean enableCheckpoint)
      Specify whether to enable the resumable mode.
      参数:
      enableCheckpoint - Identifier specifying whether the resumable mode is enabled
    • getCheckpointFile

      public String getCheckpointFile()
      File used to record download progresses in resumable mode
      返回:
      File used to record the download progress
    • setCheckpointFile

      public void setCheckpointFile(String checkpointFile)
      Specify a file used to record resumable download progresses.
      参数:
      checkpointFile - File used to record the download progress
    • getTempDownloadFile

      public String getTempDownloadFile()
      Obtain the temporary file generated during the download.
      返回:
      Temporary file generated during the download
    • getIfModifiedSince

      public Date getIfModifiedSince()
      Obtain the time conditions set for downloading the object. Only when the object is modified after the point in time specified by this parameter, it will be downloaded. Otherwise, "304 Not Modified" will be returned.
      返回:
      Time condition set for downloading the object
    • setIfModifiedSince

      public void setIfModifiedSince(Date ifModifiedSince)
      Set the time conditions set for downloading the object. Only when the object is modified after the point in time specified by this parameter, it will be downloaded. Otherwise, "304 Not Modified" will be returned.
      参数:
      ifModifiedSince - Time condition set for downloading the object
    • getIfUnmodifiedSince

      public Date getIfUnmodifiedSince()
      Obtain the time conditions for downloading the object. Only when the object remains unchanged after the point in time specified by this parameter, it will be downloaded; otherwise, "412 Precondition Failed" will be returned.
      返回:
      Time condition set for downloading the object
    • setIfUnmodifiedSince

      public void setIfUnmodifiedSince(Date ifUnmodifiedSince)
      Set the time conditions for downloading the object. Only when the object remains unchanged after the point in time specified by this parameter, it will be downloaded; otherwise, "412 Precondition Failed" will be returned.
      参数:
      ifUnmodifiedSince - Time condition set for downloading the object
    • getIfMatchTag

      public String getIfMatchTag()
      Obtain the ETag verification conditions for downloading the object. Only when the ETag of the object is the same as that specified by this parameter, the object will be downloaded. Otherwise, "412 Precondition Failed" will be returned.
      返回:
      ETag verification condition set for downloading the object
    • setIfMatchTag

      public void setIfMatchTag(String ifMatchTag)
      Set the ETag verification conditions for downloading the object. Only when the ETag of the object is the same as that specified by this parameter, the object will be downloaded. Otherwise, "412 Precondition Failed" will be returned.
      参数:
      ifMatchTag - ETag verification condition set for downloading the object
    • getIfNoneMatchTag

      public String getIfNoneMatchTag()
      Obtain the ETag verification conditions for downloading the object. Only when the ETag of the object is different from that specified by this parameter, the object will be downloaded. Otherwise, "304 Not Modified" will be returned.
      返回:
      ETag verification condition set for downloading the object
    • setIfNoneMatchTag

      public void setIfNoneMatchTag(String ifNoneMatchTag)
      Set the ETag verification conditions for downloading the object. Only when the ETag of the object is different from that specified by this parameter, the object will be downloaded. Otherwise, "304 Not Modified" will be returned.
      参数:
      ifNoneMatchTag - ETag verification condition set for downloading the object
    • getVersionId

      public String getVersionId()
      Obtain the object version ID.
      返回:
      Version ID of the object
    • setVersionId

      public void setVersionId(String versionId)
      Set the version ID of the object.
      参数:
      versionId - Version ID of the object
    • getProgressListener

      public ProgressListener getProgressListener()
      Obtain the data transfer listener.
      返回:
      Data transfer listener
    • setProgressListener

      public void setProgressListener(ProgressListener progressListener)
      Set the data transfer listener.
      参数:
      progressListener - Data transfer listener
    • getProgressInterval

      public long getProgressInterval()
      Obtain the callback threshold of the data transfer listener. The default value is 100 KB.
      返回:
      Callback threshold of the data transfer listener
    • setProgressInterval

      public void setProgressInterval(long progressInterval)
      Set the callback threshold of the data transfer listener. The default value is 100 KB.
      参数:
      progressInterval - Callback threshold of the data transfer listener
    • getCacheOption

      public CacheOptionEnum getCacheOption()
      Obtain the control option of the read-ahead cache.
      返回:
      Control option of the read-ahead cache
    • setCacheOption

      public void setCacheOption(CacheOptionEnum cacheOption)
      Set the control option of the read-ahead cache.
      参数:
      cacheOption - Control option of the read-ahead cache
    • getTtl

      public long getTtl()
      Obtain the cache data expiration time.
      返回:
      Cache data expiration time
    • setTtl

      public void setTtl(long ttl)
      Set the cache data expiration time.
      参数:
      ttl - Cache data expiration time
    • isNeedCalculateCRC64

      public boolean isNeedCalculateCRC64()
      返回:
      Whether you need sdk to calculate CRC64 value and compare it with CRC64 returned by server
    • setNeedCalculateCRC64

      public void setNeedCalculateCRC64(boolean needCalculateCRC64)
      参数:
      needCalculateCRC64 - Whether you need sdk to calculate CRC64 value and compare it with CRC64 returned by server
    • toString

      public String toString()
      覆盖:
      toString 在类中 BaseObjectRequest