类 GetObjectMetadataRequest


  • public class GetObjectMetadataRequest
    extends GenericObjectRequest
    Provides options for obtaining the metadata for the specified Baidu Bos object without actually fetching the object contents. This is useful if obtaining only object metadata, and avoids wasting bandwidth from retrieving the object data.

    The object metadata contains information such as content type, content disposition, etc., as well as custom user metadata that can be associated with an object in Baidu Bos.

    • 构造器详细资料

      • GetObjectMetadataRequest

        public GetObjectMetadataRequest​(String bucketName,
                                        String key)
        Constructs a new GetObjectMetadataRequest used to retrieve a specified object's metadata.
        参数:
        bucketName - The name of the bucket containing the object whose metadata is being retrieved.
        key - The key of the object whose metadata is being retrieved.
    • 方法详细资料

      • withBucketName

        public GetObjectMetadataRequest withBucketName​(String bucketName)
        Sets the name of the bucket containing the object whose metadata is being retrieved. Returns this GetObjectMetadataRequest, enabling additional method calls to be chained together.
        指定者:
        withBucketName 在类中 GenericBucketRequest
        参数:
        bucketName - The name of the bucket containing the object's whose metadata is being retrieved.
        返回:
        This GetObjectMetadataRequest, enabling additional method calls to be chained together.
      • withKey

        public GetObjectMetadataRequest withKey​(String key)
        Sets the key of the object whose metadata is being retrieved. Returns this GetObjectMetadataRequest, enabling additional method calls to be chained together.
        指定者:
        withKey 在类中 GenericObjectRequest
        参数:
        key - The key of the object whose metadata is being retrieved.
        返回:
        This GetObjectMetadataRequest, enabling additional method calls to be chained together.