public class SimpleStore extends Object
Constructor and Description |
---|
SimpleStore() |
Modifier and Type | Method and Description |
---|---|
void |
close()
close openned file persistence manager
|
void |
open()
open a file persistence manager
|
Object |
readObject(String key)
read object from file
|
void |
writeObject(String key,
Object object)
write object in file
|
public void open() throws FilePersistenceException, FilePersistenceInvalidClassException, FilePersistenceNotSerializableException, FilePersistenceClassNotFoundException, FilePersistenceDataCorruptedException
public void close() throws FilePersistenceException
FilePersistenceException
public void writeObject(String key, Object object) throws FilePersistenceException, FilePersistenceClassNotFoundException, FilePersistenceInvalidClassException, FilePersistenceDataCorruptedException, FilePersistenceNotSerializableException, FilePersistenceTooBigForSerializationException
key
- the object keyobject
- the object to writeFilePersistenceException
FilePersistenceClassNotFoundException
FilePersistenceInvalidClassException
FilePersistenceDataCorruptedException
FilePersistenceNotSerializableException
FilePersistenceTooBigForSerializationException
public Object readObject(String key) throws FilePersistenceException, FilePersistenceInvalidClassException, FilePersistenceNotSerializableException, FilePersistenceClassNotFoundException, FilePersistenceDataCorruptedException, FilePersistenceTooBigForSerializationException
key
- the key to retrieve the objectFilePersistenceException
FilePersistenceInvalidClassException
FilePersistenceNotSerializableException
FilePersistenceClassNotFoundException
FilePersistenceDataCorruptedException
FilePersistenceTooBigForSerializationException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.