unable to read file from ftp in android?

后端 未结 2 1197
Happy的楠姐
Happy的楠姐 2021-01-17 03:36

I am trying to read data from a file from ftp server. This piece of code works perfectly in java when i run from my desktop computer. I copied over the same code to android

2条回答
  •  遇见更好的自我
    2021-01-17 04:21

    Remove:

    ;type=i
    

    from your URL:

     String s = "ftp://username:password@ftp.mysite.x10.mx:21/sg1996text.txt;type=i";
    

    It works in my application.

提交回复
热议问题