appendable ObjectOutputStream
To solve the problem with ObjectInputStream.readObject():
java.io.StreamCorruptedException: invalid type code: AC
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
public class AppendableObjectOutputStream extends ObjectOutputStream {
public AppendableObjectOutputStream(OutputStream out) throws IOException {
super(out);
}
@Override
protected void writeStreamHeader() throws IOException {
}
}