public class StoredObject extends Object
| Constructor and Description |
|---|
StoredObject(File file)
Creates a new StoredObject based on a file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the object
|
boolean |
exists()
Determins if the object exists
|
File |
getFile()
Returns the underlying file
|
String |
getLastModified()
Returns the last modified date of the object
|
java.time.Instant |
getLastModifiedInstant() |
String |
getName()
Returns the name of the object.
|
Set<Map.Entry<Object,Object>> |
getProperties()
Returns all properties stored along with the object.
|
File |
getPropertiesFile()
Returns the file used to store the properties and meta headers.
|
String |
getSize()
Returns the size of the object.
|
void |
storeProperties(Map<String,String> properties)
Stores the given meta infos for the stored object.
|
public StoredObject(File file)
file - the contents of the object.public String getName()
public String getSize()
public String getLastModified()
public java.time.Instant getLastModifiedInstant()
public void delete()
public File getFile()
public boolean exists()
public Set<Map.Entry<Object,Object>> getProperties()
This is the Content-MD5, Content-Type and any x-amz-meta- header.
public File getPropertiesFile()
public void storeProperties(Map<String,String> properties) throws IOException
properties - properties to storeIOException - in case of an IO errorCopyright © 2016. All rights reserved.