1

I know that RandomAccessFile does not use buffering (and unlike in case of FileInputStream, it obviously cannot be combined with BufferedInputStream).

I need to read many small chuncks of data from random file positions (which can't be sorted, as they arrive continously), so RandomAccessFile sounds ideal. My question: the filesystem still does some buffering, doesn't it? So, while I shouldn't strictly rely on it, I can still expect that reads that are close to each won't reach the hardware, will they? (assuming that reading is block-based, so the filesystem can buffer the blocks that were read)

My application can be installed both on the SD card and on the phone memory of Android devices. Android is based on linux, but I don't know how filesystem buffering works and whether it depends on if the read was from phone memory or the SD card.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.