class A implements Serializable{
private int m_int = 0;
public void static main(String[] args){
A test = new A(); // 这是要测试的对象
File f = new File( "out.txt");
FileOutputStream fout = new FileOutputStream( f);
fout.write( (byte[])test ); // 现在将它字节化
fout.close(); // 写完关闭
}
}