public void Save()
{
DataOutputStream out = null;
try {
out = new DataOutputStream(new FileOutputStream("D:\pcb-input.txt"));
} catch (FileNotFoundException e1)
{}
int i;
for(i=0;i<sum;i++)
{
//输出PCB信息
try {
out.writeInt(PCBS[i].ProID);
out.writeInt(PCBS[i].Priority);
out.writeLong(PCBS[i].InTimes);
out.writeInt(PCBS[i].InstrucNum);
for(int j=0;j<PCBS[i].InstrucNum;j++)
{
out.writeInt(PCBS[i].Instrc[j].Instruc_ID);
out.writeInt(PCBS[i].Instrc[j].Instruc_State);
out.writeDouble(PCBS[i].Instrc[j].Instruc_Times);
}
} catch (IOException e) {}
}
try {
out.flush();
out.close();
} catch (IOException e)
{}

没有问题,因为你直接写的是int,读取出来自然是乱码。记事本按照ascii而不是实际的值理解数据。没问题,你写的是对的。
如果你希望写进去的可读,需要用writeString(整数.toString());