For test purposes I'd like to get file of given size filled with random data.
So I have two questions:
- How to efficiently generate file of given size in Android?
- is RandomAccessFile sufficient method? (see Create file with given size in Java)
- How to efficiently fill the file with random data ?
- What is the best source (ideally compatible back to v7) of random bytes?
- Is it necessary, because the file would contain data previously written in allocated harddisk space?