appendable ObjectOutputStream

To solve the problem with ObjectInputStream.readObject():

 

java.io.StreamCorruptedException: invalid type code: AC

 

AppendableObjectOutputStream
public class AppendableObjectOutputStream extends ObjectOutputStream {

public AppendableObjectOutputStream(OutputStream out) throws IOException {
super(out);
}

@Override
protected void writeStreamHeader() throws IOException {

}
}

 

 

posted @ 2010-10-08 21:07  Dikang Gu  阅读(372)  评论(0编辑  收藏  举报