Interface SwiftObject
-
- All Superinterfaces:
ModelEntity,Serializable
- All Known Implementing Classes:
SwiftObjectImpl
public interface SwiftObject extends ModelEntity
Represents an Object which is a File or Directory within a Container- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DLPayloaddownload()Retrieves the Payload for the data backing the current objectDLPayloaddownload(DownloadOptions options)Retrieves the Payload for the data backing the current objectStringgetContainerName()StringgetDirectoryName()The name of the directoryStringgetETag()The MD5 checksum value of the object content.DategetLastModified()The date and time when the object was last modified.Map<String,String>getMetadata()Gets the object metadata (this is a lazy fetch)StringgetMimeType()The content type of the objectStringgetName()The name of the objectlonggetSizeInBytes()The total number of bytes that are stored in Object Storage for the accountbooleanisDirectory()Determines if this object is a pseudo directory
-
-
-
Method Detail
-
getETag
String getETag()
The MD5 checksum value of the object content.- Returns:
- the MD5 checksum
-
getLastModified
Date getLastModified()
The date and time when the object was last modified.- Returns:
- the last modified date
-
getSizeInBytes
long getSizeInBytes()
The total number of bytes that are stored in Object Storage for the account- Returns:
- total number of bytes
-
getName
String getName()
The name of the object- Returns:
- the name of the object
-
getDirectoryName
String getDirectoryName()
The name of the directory- Returns:
- the name of the directory
-
getMimeType
String getMimeType()
The content type of the object- Returns:
- the content type
-
getContainerName
String getContainerName()
- Returns:
- the container name this object belongs to
-
isDirectory
boolean isDirectory()
Determines if this object is a pseudo directory- Returns:
- true if this is a directory
-
getMetadata
Map<String,String> getMetadata()
Gets the object metadata (this is a lazy fetch)- Returns:
- the metadata for this object
-
download
DLPayload download()
Retrieves the Payload for the data backing the current object- Returns:
- the download payload
-
download
DLPayload download(DownloadOptions options)
Retrieves the Payload for the data backing the current object- Parameters:
options- the download options- Returns:
- the download payload
-
-