To solve the problem with ObjectInputStream.readObject():
java.io.StreamCorruptedException: invalid type code: AC
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
public
class
AppendableObjectOutputStream
extends
ObjectOutputStream {
public AppendableObjectOutputStream(OutputStream out) throws IOException {
super (out);
}
@Override
protected void writeStreamHeader() throws IOException {
}
}
public AppendableObjectOutputStream(OutputStream out) throws IOException {
super (out);
}
@Override
protected void writeStreamHeader() throws IOException {
}
}