Forum Navigation
File IO Problems
Posted: 11/16/08 23:14:57Hello
Where is the problem on this program?
/// write a binary file with three integers auto dfo = new DataFileOutput(new FileOutput("io.dat")); dfo.putInt(1); dfo.putInt(2); dfo.putInt(3); dfo.flush(); dfo.close(); /// read the same file auto dfi = new DataFileInput(new FileInput("io.dat")); dfi.getInt(); // get 1 dfi.seek(int.sizeof, FileConduit.Anchor.Current); // skip 2 Stdout.formatln("{}", dfi.getInt()); // get 3 dfi.close();i suppose this should print 3, but throws an IOException: "end-of-flow whilst reading"
Thanks












