类 GetObjectRequest

直接已知子类:
ReadFileRequest

public class GetObjectRequest extends GetObjectMetadataRequest
Parameters in an object download request
  • 构造器详细资料

    • GetObjectRequest

      public GetObjectRequest()
    • GetObjectRequest

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

      public GetObjectRequest(String bucketName, String objectKey, String versionId)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      versionId - Version ID of the object
  • 方法详细资料

    • getReplaceMetadata

      public ObjectRepleaceMetadata getReplaceMetadata()
      Obtain the request headers that need to be rewritten during object download.
      返回:
      Rewritten response headers
    • setReplaceMetadata

      public void setReplaceMetadata(ObjectRepleaceMetadata replaceMetadata)
      Set the request headers that need to be rewritten during object download.
      参数:
      replaceMetadata - Rewritten response headers
    • getSseCHeader

      public SseCHeader getSseCHeader()
      Obtain SSE-C decryption headers.
      覆盖:
      getSseCHeader 在类中 GetObjectMetadataRequest
      返回:
      SSE-C decryption headers
    • setSseCHeader

      public void setSseCHeader(SseCHeader sseCHeader)
      Set SSE-C decryption headers.
      覆盖:
      setSseCHeader 在类中 GetObjectMetadataRequest
      参数:
      sseCHeader - SSE-C decryption headers
    • getRangeStart

      public Long getRangeStart()
      Obtain the start position for object download.
      返回:
      Start position for object download
    • setRangeStart

      public void setRangeStart(Long rangeStart)
      Set the start position for object download.
      参数:
      rangeStart - Start position for object download
    • getRangeEnd

      public Long getRangeEnd()
      Obtain the end position for object download.
      返回:
      End position for object download
    • setRangeEnd

      public void setRangeEnd(Long rangeEnd)
      Set the end position for object download.
      参数:
      rangeEnd - End position for object download
    • getVersionId

      public String getVersionId()
      Obtain the object version ID.
      覆盖:
      getVersionId 在类中 GetObjectMetadataRequest
      返回:
      Version ID of the object
    • setVersionId

      public void setVersionId(String versionId)
      Set the version ID of the object.
      覆盖:
      setVersionId 在类中 GetObjectMetadataRequest
      参数:
      versionId - Version ID of the object
    • getIfModifiedSince

      public Date getIfModifiedSince()
      Obtain the time condition 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 condition 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 condition 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 condition 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 condition 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 condition 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 condition 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 condition 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
    • getImageProcess

      public String getImageProcess()
      Obtain image processing parameters.
      返回:
      Image processing parameters
    • setImageProcess

      public void setImageProcess(String imageProcess)
      Set image processing parameters.
      参数:
      imageProcess - Image processing parameters
    • 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
    • getRequestParameters

      public Map<String,String> getRequestParameters()
    • 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
    • setRequestParameters

      public void setRequestParameters(Map<String,String> requestParameters)
    • isAutoUnzipResponse

      public boolean isAutoUnzipResponse()
      Obtain the response to whether to automatically decompress the object compressed using gzip. The default response is false, indicating that the object is not automatically decompressed.
      Description: OBS SDK uses okhttp. If Accept-Encoding is not set in a request, okhttp automatically adds the Accept-Encoding:gzip header and decompresses the object after receiving the request.
      If the Accept-Encoding header is manually set in a request, the object will not be automatically decompressed.
      返回:
      从以下版本开始:
      3.20.5
      另请参阅:
      • BridgeInterceptor
    • setAutoUnzipResponse

      public void setAutoUnzipResponse(boolean autoUnzipResponse)
      Set the response to whether to automatically decompress the object compressed using gzip. The default response is false, indicating that the object is not automatically decompressed.
      Description: OBS SDK uses okhttp. If Accept-Encoding is not set in a request, okhttp automatically adds the Accept-Encoding:gzip header and decompresses the object after receiving the request.
      If the Accept-Encoding header is manually set in a request, the object will not be automatically decompressed.
      参数:
      autoUnzipResponse -
      从以下版本开始:
      3.20.5
      另请参阅:
      • BridgeInterceptor
    • setIsEncodeHeaders

      public void setIsEncodeHeaders(boolean encodeHeaders)
      Specifies whether to encode and decode the returned header fields.
      覆盖:
      setIsEncodeHeaders 在类中 BaseObjectRequest
      参数:
      encodeHeaders - Specifies whether to encode and decode header fields.
    • isEncodeHeaders

      public boolean isEncodeHeaders()
      Specifies whether to encode and decode the returned header fields.
      覆盖:
      isEncodeHeaders 在类中 BaseObjectRequest
      返回:
      Specifies whether to encode and decode header fields.
    • toString

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