Hi, I use this code to download and read the contents of a file
It is possible to read the contents of the file without saving it
in File.DirInternal,"Note"
B4X:
testo="miofile.txt"
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.miofile/foldername/" & testo)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream
out = File.OpenOutput(File.DirInternal,"Note", False)
File.Copy2(J.GetInputStream,out)
out.close
L2.Initialize
L2 = File.ReadList(File.DirInternal,"note")
Label1.Text= L2.get(0)
End If
in File.DirInternal,"Note"