@EJP is right.it cannot append to an existing file created with an ObjectOutputStream. You can do the following steps to fix it:
1. keep ObjectOutputStream object reference
2. after writeObject() having been called, do not call close()
3. provide a method to close ObjectOutputStream.