com.netease.cloud.services.nos.model
public class GetObjectMetadataRequest extends WebServiceRequest
Provides options for obtaining the metadata for the specified 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 .
For more information about enabling versioning for a bucket, see
Nos#setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.
GetObjectMetadataRequest(String, String)
,
GetObjectMetadataRequest#GetObjectMetadataRequest(String, String,
String)
,
GetObjectRequest
logID, logSeq
Constructor and Description |
---|
GetObjectMetadataRequest(String bucketName,
String key)
Constructs a new
GetObjectMetadataRequest used to retrieve a
specified object's metadata. |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Gets the name of the bucket containing the object whose metadata is being
retrieved.
|
String |
getKey()
Gets the key of the object whose metadata is being retrieved.
|
Date |
getModifiedSinceConstraint()
Gets the optional modified constraint that restricts this request to
executing only if the object has been modified after the specified
date.
|
void |
setBucketName(String bucketName)
Sets the name of the bucket containing the object whose metadata is being
retrieved.
|
void |
setKey(String key)
Sets the key of the object whose metadata is being retrieved.
|
void |
setModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to
executing only if the object has been modified after the specified
date.
|
GetObjectMetadataRequest |
withBucketName(String bucketName)
Sets the name of the bucket containing the object whose metadata is being
retrieved.
|
GetObjectMetadataRequest |
withKey(String key)
Sets the key of the object whose metadata is being retrieved.
|
addSpecialHeader, copyPrivateRequestParameters, getAndIncrementLogSeq, getLogID, getLogSeq, getRequestClientOptions, getRequestCredentials, getToken, needSetLogInfo, setLogID, setLogSeq, setRequestCredentials, setToken
public GetObjectMetadataRequest(String bucketName, String key)
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.GetObjectMetadataRequest#GetObjectMetadataRequest(String bucketName,
String key, String versionId)
public String getBucketName()
setBucketName(String bucketName)
,
withBucketName(String)
public void setBucketName(String bucketName)
bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.getBucketName()
,
withBucketName(String)
public GetObjectMetadataRequest withBucketName(String bucketName)
GetObjectMetadataRequest
, enabling
additional method calls to be chained together.bucketName
- The name of the bucket containing the object's whose metadata
is being retrieved.GetObjectMetadataRequest
, enabling additional method
calls to be chained together.getBucketName()
,
setBucketName(String bucketName)
public String getKey()
setKey(String)
,
withKey(String)
public void setKey(String key)
key
- The key of the object whose metadata is being retrieved.getKey()
,
withKey(String)
public GetObjectMetadataRequest withKey(String key)
GetObjectMetadataRequest
, enabling additional method calls
to be chained together.key
- The key of the object whose metadata is being retrieved.GetObjectMetadataRequest
, enabling additional method
calls to be chained together.getKey()
,
setKey(String)
public Date getModifiedSinceConstraint()
GetObjectRequest.setModifiedSinceConstraint(Date)
,
GetObjectRequest.withModifiedSinceConstraint(Date)
public void setModifiedSinceConstraint(Date date)
Note that Nos will ignore any dates occurring in the future.
date
- The modified constraint that restricts this request to
executing only if the object has been modified after
the specified date.GetObjectRequest.getModifiedSinceConstraint()
,
GetObjectRequest.withModifiedSinceConstraint(Date)
Copyright © 2017. All Rights Reserved.