android - pre-allocate space for a file before downloading it

Posted by android developer on Stack Overflow See other posts from Stack Overflow or by android developer
Published on 2012-02-12T20:21:27Z Indexed on 2013/10/26 21:55 UTC
Read the original article Hit count: 241

Filed under:
|
|
|

how can i create a pre-allocated file on android? something like a sparse file ?

i need to make an applicaton that will download a large file , and i want to avoid having an out-of-space error while the download is commencing . my solution needs to support resuming and writing to both internal and external storage.

i've tried what is written here: Create file with given size in Java but none of the solutions there didn't work for some reason.

© Stack Overflow or respective owner

Related posts about android

Related posts about file