java - Fastest method to read/write to SD card in Android? -


There are several different types of classes for reading / writing files in Android. For example, you can use java.nio.ByteBuffer, FileOutputStream and BufferedOutputStream. Are there any general guidelines for using the SD card to quickly write / write? For example, bufferoutputstream seems like it should speed things up, but I'm not sure buffer size should be set.

Specifically, I want to read / write byte arrays which are in ~ 1MB size as can be done by me. Benchmark ('Conclusions' section is definitely worth it) in different ways to quickly read files in Java on one PC.

one reading). You can find it useful as a guide, but you really should try different ways and see what works fast for you.


Comments