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 void
addUserMetadata(String key, String value)
Adds the key value pair of custom user-metadata for the associated object.String
getContentEncoding()
long
getContentLength()
Map<String,String>
getUserMetadata()
void
setContentEncoding(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.void
setContentLength(long contentLength)
Sets size of the associated object in bytes
-
-
-
Method Detail
-
getUserMetadata
public Map<String,String> getUserMetadata()
- Specified by:
getUserMetadata
in interfaceStorageObjectMetadata
- Returns:
- returns a Map/key-value pairs of metadata properties
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceStorageObjectMetadata
- Returns:
- returns the size of object in bytes
-
setContentLength
public void setContentLength(long contentLength)
Description copied from interface:StorageObjectMetadata
Sets size of the associated object in bytes- Specified by:
setContentLength
in interfaceStorageObjectMetadata
- Parameters:
contentLength
- the length of content
-
addUserMetadata
public void addUserMetadata(String key, String value)
Description copied from interface:StorageObjectMetadata
Adds the key value pair of custom user-metadata for the associated object.- Specified by:
addUserMetadata
in interfaceStorageObjectMetadata
- Parameters:
key
- the key of user metadatavalue
- the value of user metadata
-
setContentEncoding
public void setContentEncoding(String encoding)
Description copied from interface:StorageObjectMetadata
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.- Specified by:
setContentEncoding
in interfaceStorageObjectMetadata
- Parameters:
encoding
- the encoding name using in HTTP header Content-Encoding
-
getContentEncoding
public String getContentEncoding()
- Specified by:
getContentEncoding
in interfaceStorageObjectMetadata
-
-