Write the given object to the store via serialization.
Precondition - store is locked
Postcondition - store contains this object, and only this
object. All resources except lock are released. State is unchanged.
ObjectOutputStream oos = null;
FileOutputStream fos = null;
try {
oos = new ObjectOutputStream(new FileOutputStream(store.getStore(),
false));
oos.writeObject(o);
oos.flush();
}
catch (IOException ioe){
this.unlock();
throw ioe;
}
catch (IllegalStateException ise){
this.unlock();
throw ise;
}
finally {
if (fos != null) fos.close();
if (oos != null) oos.close();
}