com.baidubce.services.bos.model
Class GetObjectMetadataRequest
java.lang.Object
com.baidubce.model.AbstractBceRequest
com.baidubce.services.bos.model.GenericBucketRequest
com.baidubce.services.bos.model.GenericObjectRequest
com.baidubce.services.bos.model.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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GetObjectMetadataRequest
public GetObjectMetadataRequest(String bucketName,
String key)
- Constructs a new GetObjectMetadataRequest used to retrieve a specified object's metadata.
- Parameters:
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.
withRequestCredentials
public GetObjectMetadataRequest withRequestCredentials(BceCredentials credentials)
- Specified by:
withRequestCredentials
in class AbstractBceRequest
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.
- Specified by:
withBucketName
in class GenericBucketRequest
- Parameters:
bucketName
- The name of the bucket containing the object's whose metadata is being retrieved.
- Returns:
- 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.
- Specified by:
withKey
in class GenericObjectRequest
- Parameters:
key
- The key of the object whose metadata is being retrieved.
- Returns:
- This GetObjectMetadataRequest, enabling additional method calls to be chained together.
Copyright © 2018. All rights reserved.