类 UploadPartRequest


public class UploadPartRequest extends AbstractMultipartRequest
Parameters in a part upload request
  • 构造器详细资料

    • UploadPartRequest

      public UploadPartRequest()
    • UploadPartRequest

      public UploadPartRequest(String bucketName, String objectKey)
      Constructor
      参数:
      bucketName - Name of the bucket to which the multipart upload belongs
      objectKey - Name of the object involved in the multipart upload
    • UploadPartRequest

      public UploadPartRequest(String bucketName, String objectKey, String fileName)
      Constructor
      参数:
      bucketName - Name of the bucket to which the multipart upload belongs
      objectKey - Name of the object involved in the multipart upload
      fileName - File name to be uploaded
    • UploadPartRequest

      public UploadPartRequest(String bucketName, String objectKey, File file)
      Constructor
      参数:
      bucketName - Name of the bucket to which the multipart upload belongs
      objectKey - Name of the object involved in the multipart upload
      file - File to be uploaded
    • UploadPartRequest

      public UploadPartRequest(String bucketName, String objectKey, Long partSize, InputStream input)
      Constructor
      参数:
      bucketName - Name of the bucket to which the multipart upload belongs
      objectKey - Name of the object involved in the multipart upload
      partSize - Part size (in bytes)
      input - Data stream to be uploaded
    • UploadPartRequest

      public UploadPartRequest(String bucketName, String objectKey, Long partSize, long offset, File file)
      Constructor
      参数:
      bucketName - Name of the bucket to which the multipart upload belongs
      objectKey - Name of the object involved in the multipart upload
      partSize - Part size (in bytes)
      offset - Offset of the part in the file. The default value is 0 (in bytes).
      file - File to be uploaded
  • 方法详细资料

    • getSseCHeader

      public SseCHeader getSseCHeader()
      Obtain SSE-C encryption headers.
      返回:
      SSE-C encryption headers
    • setSseCHeader

      public void setSseCHeader(SseCHeader sseCHeader)
      Set SSE-C encryption headers.
      参数:
      sseCHeader - SSE-C encryption headers
    • getOffset

      public long getOffset()
      Obtain the offset of the part in the file. The default value is 0 (in bytes).
      返回:
      Offset of the part in the file
    • setOffset

      public void setOffset(long offset)
      Set the start position of the to-be-uploaded content in the file. This parameter is effective only when the path where the file is to be uploaded is configured. The unit is byte and the default value is 0.
      参数:
      offset - Offset of the part in the file
    • getPartNumber

      public int getPartNumber()
      Obtain the part number.
      返回:
      Part number
    • setPartNumber

      public void setPartNumber(int partNumber)
      Set the part number.
      参数:
      partNumber - Part number
    • setPartSize

      public void setPartSize(Long partSize)
      Set the part size (in bytes).
      参数:
      partSize - Part size
    • getPartSize

      public Long getPartSize()
      Obtain the part size, in bytes.
      返回:
      Part size
    • getFile

      public File getFile()
      Obtain the file to be uploaded, which cannot be used with the data stream.
      返回:
      File to be uploaded
    • setFile

      public void setFile(File file)
      Set the file to be uploaded, which cannot be used with the data stream.
      参数:
      file - File to be uploaded
    • getInput

      public InputStream getInput()
      Obtain the data stream to be uploaded, which cannot be used with the file to be uploaded.
      返回:
      Data stream to be uploaded
    • setInput

      public void setInput(InputStream input)
      Set the data stream to be uploaded, which cannot be used with the file to be uploaded.
      参数:
      input - Data stream to be uploaded
    • isAttachMd5

      public boolean isAttachMd5()
      Check whether the MD5 value of the data to be uploaded will be automatically calculated. If the MD5 value is set, this parameter can be ignored.
      返回:
      Identifier specifying whether to automatically calculate the MD5 value of the data to be uploaded
    • setAttachMd5

      public void setAttachMd5(boolean attachMd5)
      Specify whether to automatically calculate the MD5 value of the data to be uploaded. If the MD5 value is set, this parameter can be ignored.
      参数:
      attachMd5 - Identifier specifying whether to automatically calculate the MD5 value of the data to be uploaded
    • getContentMd5

      public String getContentMd5()
      Set the MD5 value of the data to be uploaded.
      返回:
      MD5 value of the data to be uploaded
    • setContentMd5

      public void setContentMd5(String contentMd5)
      Obtain the MD5 value of the data to be uploaded.
      参数:
      contentMd5 - MD5 value of the data to be uploaded
    • isAutoClose

      public boolean isAutoClose()
      Check whether the input stream will be automatically closed. The default value is "true".
      返回:
      Identifier specifying whether the input stream will be automatically closed
    • setAutoClose

      public void setAutoClose(boolean autoClose)
      Specify whether to automatically close the input stream. The default value is "true".
      参数:
      autoClose - Identifier specifying whether the input stream will be automatically closed
    • 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
    • isNeedCalculateCRC64

      public boolean isNeedCalculateCRC64()
      返回:
      Whether you need sdk to calculate CRC64 value and add it to header
    • setNeedCalculateCRC64

      public void setNeedCalculateCRC64(boolean needCalculateCRC64)
      参数:
      needCalculateCRC64 - Whether you need sdk to calculate CRC64 value and add it to header
    • getProgressManager

      public com.obs.services.internal.ProgressManager getProgressManager()
      返回:
      progressManager get progressManager which receives progress, progressManager priority is higher than ProgressListener
    • setProgressManager

      public void setProgressManager(com.obs.services.internal.ProgressManager progressManager)
      参数:
      progressManager - set progressManager to receive progress, progressManager priority is higher than ProgressListener
    • toString

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