5
2007-5-10 17:59
代码如下:
public void save(byte abyte0[], byte abyte1[])
throws IOException
{
FileOutputStream fileoutputstream = new FileOutputStream(filename);
ObjectOutputStream objectoutputstream = new ObjectOutputStream(fileoutputstream);
objectoutputstream.writeObject(abyte0);
objectoutputstream.writeObject(abyte1);
fileoutputstream.close();
break MISSING_BLOCK_LABEL_49;
Exception exception;
exception;
fileoutputstream.close();
throw exception;
}
还以为是什么嫩
就是简单的异常处理,不用惊慌
public void save(byte abyte0[], byte abyte1[]) throws IOException
{
FileOutputStream fileoutputstream = null;
ObjectOutputStream objectoutputstream = null;
try{
fileoutputstream=new FileOutputStream(filename);
objectoutputstream=new ObjectOutputStream(fileoutputstream);
objectoutputstream.writeObject(abyte0);
objectoutputstream.writeObject(abyte1);
fileoutputstream.close();
}catch(Exception exception){
try{
fileoutputstream.close();
}catch(Exception e){
System.err.println("Shit Why happend Exception");
}
}
}
关于上面代码的处理可以猜到。
你的数据信息通过 对象序列化I/O了。
重要的是 abyte0 和 abyte1两个数组的内容,我也经发邮件给你关于
break MISSING_LABEL_xxx
的原因。就不写下了。
给你提的意见:
1、不用研究文件的存储格式,因为是使用对象序列化的,标准的,可以使用对象输入输出流处理。
2、详细的分析 abyte0、abyte1的生成、数据格式
目前就这么些,如果有进展可以继续。
最好对反编译后的代码 处理一下 比如 fileoutputstream -> fout 这样可以免去他人在回复时
的换行的烦恼
author: vhly[FR]
Date: 2007/05/10