| | |
| | | public static void sqlFileUpload(String s1){ |
| | | String json1 = JSON.toJSONString(s1); |
| | | String response1 = String.valueOf((new Date()).getTime()); |
| | | OutJson.createJsonFile(json1, localPath, "n"+response1); |
| | | OutJson.createJsonFile(json1, localPath, "nsql"+response1); |
| | | FileInputStream in1 = null; |
| | | try { |
| | | in1 = new FileInputStream(new File(localPath + "n"+response1+".json")); |
| | | in1 = new FileInputStream(new File(localPath + "nsql"+response1+".json")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "n"+response1+".json", in1); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "nsql"+response1+".json", in1); |
| | | // MysqlCenlint.deletess("nsql"+response1+".json"); |
| | | } |
| | | /** |
| | | * |