Problems reading a huge file of 12 MB (java.lang.OutOfMemoryError)
问题 i need to open a file of 12 Megabytes, but actually i'm doing it creating a buffer of 12834566-byte, because the size of the file is 12MB and i am developing this app for Android mobile systems. Then, i supose i have to read with blocks of 1024 Kbytes instead of one block of 12 Mbytes, with a for, but i don't know how to do it, i need a little help with it. This is my actual code: File f = new File(getCacheDir()+"/berlin.mp3"); if (!f.exists()) try { InputStream is = getAssets().open("berlin