public static void main(String[] args) throws IOException {
DataOutputStream das = new DataOutputStream(new FileOutputStream("aa.txt"));
das.writeInt(997);
das.writeInt(998);
das.writeInt(999);
das.close();
DataInputStream dis = new DataInputStream(new FileInputStream("aa.txt"));
int x = dis.readInt();
int y = dis.readInt();
int z = dis.readInt();
System.out.println(x);
System.out.println(y);
System.out.println(z);
dis.close();
}
|
|