Hello
How to get image from path of external server, this code fault
Code:
Dim link As String = "//folder/various/testimg/logo.png"
Dim job As HttpJob
job.Initialize("j", Me)
job.Download(link)
Sub JobDone(job As HttpJob)
If job.Success Then
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "filename.dat", False)
File.Copy2(job.GetInputStream, out)
out.Close '<------ very important
Else
Log("Error: " & job.ErrorMessage)
End If
job.Release
End Sub
the error is:
java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, host=map, path=//folder/various/testimg/logo.png
How to get image from path of external server, this code fault
Code:
Dim link As String = "//folder/various/testimg/logo.png"
Dim job As HttpJob
job.Initialize("j", Me)
job.Download(link)
Sub JobDone(job As HttpJob)
If job.Success Then
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "filename.dat", False)
File.Copy2(job.GetInputStream, out)
out.Close '<------ very important
Else
Log("Error: " & job.ErrorMessage)
End If
job.Release
End Sub
the error is:
java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, host=map, path=//folder/various/testimg/logo.png