|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.commons.AbstractFileStorage sk.baka.ambient.commons.ObjectStorage
public final class ObjectStorage
Stores objects as files. The file content is composed of a serialized form of the object.
Field Summary |
---|
Fields inherited from class sk.baka.ambient.commons.AbstractFileStorage |
---|
maxStorageSize, theCache |
Constructor Summary | |
---|---|
ObjectStorage(String ext)
Creates new playlist storage. |
Method Summary | |
---|---|
boolean |
contains(String name)
Checks if a playlist with given name is present in the storage. |
void |
delete(String name)
Deletes given playlist. |
Serializable |
loadObject(String name)
Loads (deserializes) a stored playlist. |
void |
saveObject(String name,
Serializable object)
Stores (serializes) a stored playlist. |
Methods inherited from class sk.baka.ambient.commons.AbstractFileStorage |
---|
cleanup, close, createFile, fetchFileAsync, getCacheFile, getCacheFileNull, getFile, getFilenameAndExt, getNames, isFull, isProceedWithDownload, onFileDownloaded, purge, registerFile, removeFile, setMaxStorageSize, supportsExtension, toURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectStorage(String ext)
ext
- the extension in the form ".ext"Method Detail |
---|
public Serializable loadObject(String name) throws IOException
name
- the name
IOException
- if something happens during the deserialization.public void saveObject(String name, Serializable object) throws IOException
name
- the nameobject
- the object to serialize.
IOException
- if something happens during the deserialization.public boolean contains(String name)
name
- the file name
true
if such playlist is available,
false
otherwise.public void delete(String name)
name
- the file name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |