|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.blogentis.slide.SlideMemoryFile
A memory-based AbstractFileResource. It is mainly used for saving to the slide store.
| Field Summary | |
(package private) java.util.Map |
properties
|
| Constructor Summary | |
SlideMemoryFile(Blog blog,
java.lang.String path)
|
|
| Method Summary | |
boolean |
exists()
Check whether the file exists. |
Blog |
getBlog()
|
java.io.InputStream |
getFileAsInputStream()
|
java.lang.String |
getFileAsString()
Get the contents of the file as a string. |
java.util.Date |
getLastModified()
Get the last modification time of the file. |
java.lang.String |
getMimeType()
Get the stored mime-type of the file or compute it. |
java.lang.String |
getPath()
Get the the path that this file has. |
java.lang.String |
getProperty(java.lang.String propertyName)
Retrieve a property of the file. |
int |
getSize()
Get the size of the file. |
boolean |
isDirectory()
Determine if this is a directory. |
boolean |
isOriginal()
Check whether this file has not been modified by the user. |
void |
setContents(byte[] contents)
|
void |
setContents(java.io.InputStream contents)
|
void |
setLastModified(java.util.Date lastModified)
|
void |
setMimeType(java.lang.String mimeType)
|
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyContents)
Set a property on a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.Map properties
| Constructor Detail |
public SlideMemoryFile(Blog blog,
java.lang.String path)
| Method Detail |
public void setContents(byte[] contents)
public void setContents(java.io.InputStream contents)
public java.lang.String getPath()
AbstractFileResource
getPath in interface AbstractFileResourcepublic boolean exists()
AbstractFileResource
exists in interface AbstractFileResourcepublic int getSize()
AbstractFileResource
getSize in interface AbstractFileResourcepublic java.util.Date getLastModified()
AbstractFileResource
getLastModified in interface AbstractFileResourcepublic java.lang.String getMimeType()
AbstractFileResource
getMimeType in interface AbstractFileResource
public java.io.InputStream getFileAsInputStream()
throws java.io.FileNotFoundException
getFileAsInputStream in interface AbstractFileResourcejava.io.FileNotFoundException
public java.lang.String getFileAsString()
throws java.io.FileNotFoundException
AbstractFileResource
getFileAsString in interface AbstractFileResourcejava.io.FileNotFoundExceptionpublic Blog getBlog()
public void setLastModified(java.util.Date lastModified)
public void setMimeType(java.lang.String mimeType)
public boolean isOriginal()
AbstractFileResource
isOriginal in interface AbstractFileResourcepublic java.lang.String getProperty(java.lang.String propertyName)
AbstractFileResource
getProperty in interface AbstractFileResourcepropertyName - the name of the property to fetch.
public void setProperty(java.lang.String propertyName,
java.lang.String propertyContents)
AbstractFileResource
setProperty in interface AbstractFileResourcepropertyName - the name of the property.propertyContents - the contents of the property.public boolean isDirectory()
AbstractFileResource
isDirectory in interface AbstractFileResource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||