刘韬 3 years ago
parent
commit
598b1b1370
1 changed files with 3 additions and 1 deletions
  1. 3 1
      DataFusion/src/com/zskk/task/DownloadTask.java

+ 3 - 1
DataFusion/src/com/zskk/task/DownloadTask.java

@@ -88,7 +88,7 @@ public class DownloadTask implements ITask {
         String path = "/home/lenovo/CFIND_XML";
         Random r = new Random();
         Integer ran1 = r.nextInt(10000);
-        File file = new File(path, uid+ran1.toString()+".dcm");
+        File file = new File(path, uid+ran1.toString());
         try {
             fos = new FileOutputStream(file);
             byte[] bytes = new byte[1024];
@@ -116,6 +116,8 @@ public class DownloadTask implements ITask {
                 e.printStackTrace();
             }
         }
+        file.renameTo(new File(path, uid+ran1.toString()+".dcm"));
+
     }
 	
 	/**