// Property accessors
public CloudStoreObjectMetadata getMetadata( )
{
CloudStoreObjectMetadata output = new CloudStoreObjectMetadata( );
SimpleDateFormat sdf = new SimpleDateFormat(
"EEE, dd MMM yyyy HH:mm:ss z", Locale.US );
// Wed, 01 Mar 2006 12:00:00 GMT
for ( String key : _tags.keySet( ) )
{
if ( key.equals( LAST_MODIFIED ) )
{
try
{
output.setLastModifiedDate( sdf
.parse( _tags.get( key ) ) );
}
catch ( ParseException e )
{
throw new CloudStoreException(
"Error parsing last modified date meta-data response from store '"
+ getCloudloopToken( ) + "'." );
}
}
else if ( key.equals( CONTENT_LENGTH ) )
{
output.setContentLengthInBytes( Long.valueOf( _tags
.get( key ) ) );
}
else if ( key.equals( ETAG ) )
{
output.setETag( _tags.get( key ) );
}
else
{
// custom tag
output.setCustomTag( key.replace( X_AMZ_META, "" ),
StringUtil
.unescape( _tags.get( key ) ) );
}
}
return output;