|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.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(java.lang.String ext)
Creates new playlist storage. |
|
| Method Summary | |
|---|---|
boolean |
contains(java.lang.String name)
Checks if a playlist with given name is present in the storage. |
void |
delete(java.lang.String name)
Deletes given playlist. |
java.io.Serializable |
loadObject(java.lang.String name)
Loads (deserializes) a stored playlist. |
void |
saveObject(java.lang.String name,
java.io.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(java.lang.String ext)
ext - the extension in the form ".ext"| Method Detail |
|---|
public java.io.Serializable loadObject(java.lang.String name)
throws java.io.IOException
name - the name
java.io.IOException - if something happens during the deserialization.
public void saveObject(java.lang.String name,
java.io.Serializable object)
throws java.io.IOException
name - the nameobject - the object to serialize.
java.io.IOException - if something happens during the deserialization.public boolean contains(java.lang.String name)
name - the file name
true if such playlist is available,
false otherwise.public void delete(java.lang.String name)
name - the file name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||