Appending to an ObjectOutputStream

Here’s the trick: subclass ObjectOutputStream and override the writeStreamHeader method: public class AppendingObjectOutputStream extends ObjectOutputStream { public AppendingObjectOutputStream(OutputStream out) throws IOException { super(out); } @Override protected void writeStreamHeader() throws IOException { // do not write a header, but reset: // this line added after another question // showed a problem with the original reset(); } … Read more