Apache Commons VFS通过端口映射获取或放置文件

时间:2015-06-01 06:36:47

标签: sftp vfs

我有一个问题,使用commons-vfs2就像图片一样,客户端和文件服务器之间有一个服务器用于映射文件服务器端口从22到10022,我怎样才能使用commons-vfs2上传或者通过sftp和ftp协议从文件服务器下载文件?

我尝试使用代理如下代码:

SftpFileSystemConfigBuilder.getInstance().setProxyHost(opts, "xxx.6.2.xx");
SftpFileSystemConfigBuilder.getInstance().setProxyPort(opts, 10022);
SftpFileSystemConfigBuilder.getInstance().setProxyType(opts, SftpFileSystemConfigBuilder.PROXY_HTTP);

但它不起作用,图片网址为http://ccwuj.img44.wal8.com/img44/507529_20150115150159/143279929037.jpg

0 个答案:

没有答案
相关问题