When downloading a CSV file using HTTPJOB Is there a way to save a CSV file directly to a string instead of to a file?
How do I convert the j.GetInputStream to just a normal string?
B4X:
Sub DownloadAndSave (Url As String, Dir As String, FileName As String) As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Url)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream = File.OpenOutput(Dir, FileName, False)
File.Copy2(j.GetInputStream, out)
out.Close
End If
j.Release
Return j.Success
End Sub
How do I convert the j.GetInputStream to just a normal string?