Last time when I'm using Picasso on one of my previous Android project, I use to think that the library have a bug, where it store corrupted image sometime.
I try to compare the final image size that was stored is same as the HTTP response size, to make sure no corrupted image been stored. But corrupted image still happen randomly, which make me feel like want to switch to use other caching library.
Recently when I'm troubleshooting a large PDF file download issue on my current project, I found out that the PDF file quite often been stored as a corrupted file as well.
After spend some time to look at the issue, I find out that is actually concurrent update problem, where I try to call read & write at the same time. So I try to add a ReverseAtomicFile.java to handle it.
It is just a reverse version of AtomicFile.java written by Android.