Suppose I have the following code in Java:
FileInputStream fin = new FileInputStream(filename);
DataInputStream x = new DataInputStream(fin);
DataInputStream y = new DataInputStream(fin);
DataInputStream z = new DataInputStream(fin);
I want to use y.skip(100) and z.skip(200) to simultaneously read data from the file at different positions. Will this work? I'm getting EOF errors at the moment...
EDIT
I did try the following code:
FileInputStream fin1 = new FileInputStream(filename);
FileInputStream fin2 = new FileInputStream(filename);
FileInputStream fin3 = new FileInputStream(filename);
DataInputStream x = new DataInputStream(fin1);
DataInputStream y = new DataInputStream(fin2);
DataInputStream z = new DataInputStream(fin3);
This does not produce EOF errors, but still not sure if this might return corrupted data?...