Class S3ObjectMetadata
- java.lang.Object
-
- net.snowflake.client.jdbc.cloud.storage.S3ObjectMetadata
-
- All Implemented Interfaces:
StorageObjectMetadata
public class S3ObjectMetadata extends Object implements StorageObjectMetadata
s3 implementation of platform independent StorageObjectMetadata interface, wraps an S3 ObjectMetadata classIt only supports a limited set of metadata properties currently used by the JDBC client
- Author:
- lgiakoumakis
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUserMetadata(String key, String value)Adds the key value pair of custom user-metadata for the associated object.StringgetContentEncoding()longgetContentLength()Map<String,String>getUserMetadata()voidsetContentEncoding(String encoding)Sets the optional Content-Encoding HTTP header specifying what content encodings, have been applied to the object and what decoding mechanisms must be applied, in order to obtain the media-type referenced by the Content-Type field.voidsetContentLength(long contentLength)Sets size of the associated object in bytes
-
-
-
Method Detail
-
getUserMetadata
public Map<String,String> getUserMetadata()
- Specified by:
getUserMetadatain interfaceStorageObjectMetadata- Returns:
- returns a Map/key-value pairs of metadata properties
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceStorageObjectMetadata- Returns:
- returns the size of object in bytes
-
setContentLength
public void setContentLength(long contentLength)
Description copied from interface:StorageObjectMetadataSets size of the associated object in bytes- Specified by:
setContentLengthin interfaceStorageObjectMetadata- Parameters:
contentLength- the length of content
-
addUserMetadata
public void addUserMetadata(String key, String value)
Description copied from interface:StorageObjectMetadataAdds the key value pair of custom user-metadata for the associated object.- Specified by:
addUserMetadatain interfaceStorageObjectMetadata- Parameters:
key- the key of user metadatavalue- the value of user metadata
-
setContentEncoding
public void setContentEncoding(String encoding)
Description copied from interface:StorageObjectMetadataSets the optional Content-Encoding HTTP header specifying what content encodings, have been applied to the object and what decoding mechanisms must be applied, in order to obtain the media-type referenced by the Content-Type field.- Specified by:
setContentEncodingin interfaceStorageObjectMetadata- Parameters:
encoding- the encoding name using in HTTP header Content-Encoding
-
getContentEncoding
public String getContentEncoding()
- Specified by:
getContentEncodingin interfaceStorageObjectMetadata
-
-