valekuatro Member Licensed User Aug 26, 2017 #1 Code: Copy If HttpUtils.IsSuccess(FileUrl) Then File.Copy2(HttpUtils.GetInputStream(FileUrl),File.OpenOutput(File.DirRootExternal,FileName,False)) ToastMessageShow("Done", False) Else ToastMessageShow("Error!", False) End If It throw no errors, download the file, size correct, but content of the file is incomplete or bad.
Code: Copy If HttpUtils.IsSuccess(FileUrl) Then File.Copy2(HttpUtils.GetInputStream(FileUrl),File.OpenOutput(File.DirRootExternal,FileName,False)) ToastMessageShow("Done", False) Else ToastMessageShow("Error!", False) End If It throw no errors, download the file, size correct, but content of the file is incomplete or bad.
DonManfred Expert Licensed User Longtime User Aug 26, 2017 #2 File. Copy2 (In As java.io.InputStream, Out As java.iutputStream) Copies all the available data from the input stream into the output stream. The input stream is automatically closed at the end. Click to expand... The inputstream are automatically closed. The outputstream not. Close the outputstream. Upvote 0
File. Copy2 (In As java.io.InputStream, Out As java.iutputStream) Copies all the available data from the input stream into the output stream. The input stream is automatically closed at the end. Click to expand... The inputstream are automatically closed. The outputstream not. Close the outputstream.
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2017 #3 Why are you using the very old HttpUtils 1 module? You should use OkHttpUtils2 instead. Upvote 0