开发者

File Not Found Exception apache common

Currently I figured out how to connect to my FTP with apache common to download things (enter IP not the ftp.xxx adress). But now I can an FileNotFound, eventhough it really is there and has every开发者_如何转开发thing set to 777

I already saw that apache is adding the "/" by himself so normally It should work, uploading is no problem. Any ideas? I can open the file if I enter it in my URL bar


You should create a file in your system, something like:

File f = new File("path/to/file");
if (f.exists() == false)
{
   f.createNewFile();
}
FileOutputStream fos = new FileOutputStream(f.getAbsoluteFile());
client.retrieveFile("Filenametoretrieve", fos);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜