When it go the "Mp3File mp3File = new Mp3File(path);" and the file's size out of 28m,it will throw the OutOfMemoryError
java.lang.OutOfMemoryError: Failed to allocate a 29770255 byte allocation with 6291456 free bytes and 16MB until OOM, max allowed footprint 39725816, growth limit 50331648
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at java.nio.DirectByteBuffer$MemoryRef.<init>(DirectByteBuffer.java:71)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:240)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:168)
at sun.nio.ch.IOUtil.read(IOUtil.java:195)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:187)
at com.mpatric.mp3agic.Mp3File.initCustomTag(Mp3File.java:313)
at com.mpatric.mp3agic.Mp3File.init(Mp3File.java:101)
at com.mpatric.mp3agic.Mp3File.<init>(Mp3File.java:58)
at com.mpatric.mp3agic.Mp3File.<init>(Mp3File.java:45)
at com.acloud.stub.localmusic.QtActivity.getMp3bytes(QtActivity.java:1522)
at com.acloud.stub.localmusic.QtActivity.lambda$loadArtistImageWithSongPath$1$QtActivity(QtActivity.java:1502)
at com.acloud.stub.localmusic.-$$Lambda$QtActivity$zqAHJFCvZ72ENomoa5ol6UnlrjE.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Unable to read a 28m file
When it go the "Mp3File mp3File = new Mp3File(path);" and the file's size out of 28m,it will throw the OutOfMemoryError