Say I need to read huge binary file of integers, a handy way is:
FileInputStream fi = new FileInputStream(file); BufferedInputStream bi = new BufferedInput
Have a look at NIO. For example, java.nio.MappedByteBuffer.
Just start with fi.skip(position) before wrapping it with bi and di. The underlying stream actually makes a call to seek when position is sufficiently large.