日期:2014-05-19  浏览次数:20704 次

TftpClient的sendFile()报connection timeout?
现在我需要用tftp 讲一个文件传到服务器的/temp目录下  

但是TftpClient 没有方法来设置这个上传目录的?

而且我在调用sendFile()的时候 一直报超时链接?

TFTPClient tftp = new TFTPClient();
tftp.setDefaultTimeout(60000);

try {
  tftp.open();
  File file = new File("E://aa.tar.gz");
  InputStream in = new FileInputStream(file);
  int transferMode = TFTP.BINARY_MODE;
  tftp.sendFile("dds.tar.gz", transferMode, in, "192.168.58.110");
  } catch (SocketException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  } catch (Exception e) { 
  e.printStackTrace();
  }

------解决方案--------------------
沙发

可是没用过Tftp

顶起
------解决方案--------------------
顶起 可以去看看有关tftp文档

------解决方案--------------------
顶 ! ! !