net.noderunner.amazon.s3
Class Entry

java.lang.Object
  extended by net.noderunner.amazon.s3.Entry
All Implemented Interfaces:
Comparable<Entry>

public class Entry
extends Object
implements Comparable<Entry>

A structure representing a single object stored in S3.


Constructor Summary
Entry(String key)
          Constructs a new Entry.
 
Method Summary
 int compareTo(Entry other)
          Compares by key name.
 boolean equals(Object other)
          Returns true if other is an entry with the same key.
 String getETag()
          Returns the object's ETag, which can be used for conditional GETs.
 String getKey()
          Returns the name of the object
 Date getLastModified()
          The date at which the object was last modified.
 Owner getOwner()
          Returns the object's owner
 long getSize()
          Returns the size of the object in bytes.
 String getStorageClass()
          The object's storage class
 int hashCode()
          Calculates hash using the key.
 void setLastModified(Date lastModified)
          Sets lastModified.
 void setOwner(Owner owner)
          Sets owner.
 void setSize(long size)
          Sets size.
 String toString()
          Returns the key
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Entry

public Entry(String key)
Constructs a new Entry.

Method Detail

setLastModified

public void setLastModified(Date lastModified)
Sets lastModified.


getLastModified

public Date getLastModified()
The date at which the object was last modified.


toString

public String toString()
Returns the key

Overrides:
toString in class Object

getKey

public String getKey()
Returns the name of the object


getETag

public String getETag()
Returns the object's ETag, which can be used for conditional GETs.


setOwner

public void setOwner(Owner owner)
Sets owner.


getOwner

public Owner getOwner()
Returns the object's owner


setSize

public void setSize(long size)
Sets size.


getSize

public long getSize()
Returns the size of the object in bytes.


getStorageClass

public String getStorageClass()
The object's storage class


equals

public boolean equals(Object other)
Returns true if other is an entry with the same key.

Overrides:
equals in class Object

hashCode

public int hashCode()
Calculates hash using the key.

Overrides:
hashCode in class Object

compareTo

public int compareTo(Entry other)
Compares by key name.

Specified by:
compareTo in interface Comparable<Entry>


Copyright © 2011. All Rights Reserved.