chollinger
chollinger

Reputation: 1117

Android I/O with files >16MB

Is it possible to work with I/O-files that're >=16MB on Android? Currently I'm using the new Java NIO-API (FileChanel), split the array using System.arraycopy and put the chunks into a collection. If the files is >= 16MB, the thread throws an OutOfMemoryError.

Any suggestions? The normal I/O-API was way to slow.

Thanks in advance.

Upvotes: 0

Views: 148

Answers (1)

Boris Strandjev
Boris Strandjev

Reputation: 46963

The problem is that Android applications have limit of 16MB RAM per application - thus you get the out of memory exception. Currently if you want to support the most common Android versions you can not avoid this limitations. You will need to process the file in parts.

Upvotes: 1

Related Questions