Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

Best way to download large files direct to disk?

$
0
0
Hi,
I am writing a process that will download a file (in the background, no GUI interaction) and will save it onto the users drive. Once it is saved to disk they will be notified.

I don't want to use FileReference as that prompts the user, I also don't want to just use UrlStream direct into a ByteArray because the files can be quite big and I don't want to hog memory.

What would you recommend I do? Is the only option to simply do an urlstream.readBytes() into a smaller temporary ByteArray and then immediately write those bytes to disk, rather than appending to an overall larger byte array that only gets written once the entire file is saved?

Viewing all articles
Browse latest Browse all 21156

Trending Articles