刘韬 4 years ago
parent
commit
6693a9968b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      DataFusion/src/com/zskk/service/DataService.java

+ 2 - 2
DataFusion/src/com/zskk/service/DataService.java

@@ -90,7 +90,7 @@ public class DataService {
         InputStream in = null;
         OutputStream out = null;
         try {
-            SmbFile remoteFile = new SmbFile(remoteUrl + shareFolderPath + "/" + fileName,NtlmPasswordAuthentication.ANONYMOUS);
+            SmbFile remoteFile = new SmbFile(remoteUrl + shareFolderPath + File.separator + fileName,NtlmPasswordAuthentication.ANONYMOUS);
             File localFile = new File(localDir + File.separator + fileName);
             in = new BufferedInputStream(new SmbFileInputStream(remoteFile));
             out = new BufferedOutputStream(new FileOutputStream(localFile));
@@ -116,7 +116,7 @@ public class DataService {
 //    	map.put("institution_id", "47600001");
 //    	map.put("num", "10");
 //		postWithParameters(GET_EXAM_URL, map);
-    	downloadFileToFolder("smb://192.168.1.140", "/VAIO/ConsoleTest", "Program.cs", "/Users/liutao/Desktop/GIT_CODE");
+    	downloadFileToFolder("smb://192.168.31.150", "/share", "test.png", "/Users/liutao/Desktop/GIT_CODE");
 	}
 
 }