9 Replies Latest reply on Dec 15, 2008 12:41 PM by borfgordon

    Best way to download large files direct to disk?

    borfgordon Level 1
      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?