com.rackspacecloud.client.cloudfiles
Class FilesObjectMetaData

java.lang.Object
  extended by com.rackspacecloud.client.cloudfiles.FilesObjectMetaData
Direct Known Subclasses:
FilesObjectMetaDataExt

public class FilesObjectMetaData
extends java.lang.Object


Field Summary
protected  java.lang.String contentLength
           
protected  java.lang.String eTag
           
protected  java.lang.String lastModified
           
protected  java.util.Map<java.lang.String,java.lang.String> metaData
           
protected  java.lang.String mimeType
           
 
Constructor Summary
FilesObjectMetaData(java.lang.String mimeType, java.lang.String contentLength, java.lang.String lastModified)
          An object storing the metadata for an FS Cloud object
FilesObjectMetaData(java.lang.String mimeType, java.lang.String contentLength, java.lang.String eTag, java.lang.String lastModified)
          An object storing the metadata for an FS Cloud object
 
Method Summary
 void addMetaData(java.lang.String key, java.lang.String value)
          Add a new meta-data entry (or overwrite an old one)
 boolean containesKey(java.lang.String key)
          Tests to see if a given metadata key is present for this object
 java.lang.String getContentLength()
          The size of the object, in bytes
 java.lang.String getETag()
          The MD5 checksum represented in a hex-encoded string
 java.lang.String getLastModified()
          The last time the object was modified
 java.util.Map<java.lang.String,java.lang.String> getMetaData()
          The metadata associated with this object.
 java.lang.String getMetaKey(java.lang.String key)
          Constructs a new header for a given metadata key
 java.lang.String getMimeType()
          The MIME type of the object
 void setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData)
          Set new metatdata for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mimeType

protected java.lang.String mimeType

contentLength

protected java.lang.String contentLength

eTag

protected java.lang.String eTag

lastModified

protected java.lang.String lastModified

metaData

protected java.util.Map<java.lang.String,java.lang.String> metaData
Constructor Detail

FilesObjectMetaData

public FilesObjectMetaData(java.lang.String mimeType,
                           java.lang.String contentLength,
                           java.lang.String eTag,
                           java.lang.String lastModified)
An object storing the metadata for an FS Cloud object

Parameters:
mimeType - The MIME type for the object
contentLength - The content-length (e.g., size) of the object
eTag - The MD5 check-sum of the object's contents
lastModified - The last time the object was modified.

FilesObjectMetaData

public FilesObjectMetaData(java.lang.String mimeType,
                           java.lang.String contentLength,
                           java.lang.String lastModified)
An object storing the metadata for an FS Cloud object

Parameters:
mimeType - The MIME type for the object
contentLength - The content-length (e.g., size) of the object
lastModified - The last time the object was modified.
Method Detail

getLastModified

public java.lang.String getLastModified()
The last time the object was modified

Returns:
The last modification date

getMimeType

public java.lang.String getMimeType()
The MIME type of the object

Returns:
The MIME type of the object

getContentLength

public java.lang.String getContentLength()
The size of the object, in bytes

Returns:
The size of the object

getETag

public java.lang.String getETag()
The MD5 checksum represented in a hex-encoded string

Returns:
The eTag

getMetaData

public java.util.Map<java.lang.String,java.lang.String> getMetaData()
The metadata associated with this object.

Returns:
The object's metadata

setMetaData

public void setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData)
Set new metatdata for this object. Warning, this metadata clears out all old metadata. To add new fields, use setMetaData instead.

Parameters:
metaData - The new metadata

addMetaData

public void addMetaData(java.lang.String key,
                        java.lang.String value)
Add a new meta-data entry (or overwrite an old one)

Parameters:
key - The key for this key-value pair
value - The value for this key-value pair

getMetaKey

public java.lang.String getMetaKey(java.lang.String key)
Constructs a new header for a given metadata key

Parameters:
key - The key
Returns:
The name of a header for this key

containesKey

public boolean containesKey(java.lang.String key)
Tests to see if a given metadata key is present for this object

Parameters:
key - The key to check for
Returns:
True if it's present, false otherwise.