首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

使用sun.net.ftp上载、下传文件完整版(转)

2012-12-24 
使用sun.net.ftp下载、上传文件完整版(转)?Junit测试类package com.northking.dataManager.dataimport.pars

使用sun.net.ftp下载、上传文件完整版(转)

?Junit测试类

package com.northking.dataManager.dataimport.parse.test;import com.northking.dataManager.util.FtpTool;import junit.framework.TestCase;/** * @author maochangming * @date 2008-6-20  13:09:11 * @description: */public class FtpToolTest extends TestCase {FtpTool ftpTool;/** * Constructor for FtpToolTest. * @param arg0 */public FtpToolTest(String arg0) {super(arg0);}public static void main(String[] args) {junit.textui.TestRunner.run(FtpToolTest.class);}public void testDownLoadFile()throws Exception{ftpTool.downloadFile(ftpTool.getRemotePath(),"c:/downloads","JBFImgMng.CAB");}/* * @see TestCase#setUp() */protected void setUp() throws Exception {ftpTool = new FtpTool();ftpTool.setIp("10.164.12.70");ftpTool.setPort(2100);ftpTool.setUser("share");ftpTool.setPwd("share");ftpTool.setRemotePath("/paeams");super.setUp();}/* * @see TestCase#tearDown() */protected void tearDown() throws Exception {super.tearDown();}}
?

热点排行