| | |
| | | try { |
| | | // new String[] { "/bin/sh", "-c", cmd } |
| | | process = Runtime.getRuntime().exec(cmd); |
| | | nr = new BufferedReader(new InputStreamReader(process.getInputStream())); |
| | | er = new BufferedReader(new InputStreamReader(process.getErrorStream())); |
| | | nr = new BufferedReader(new InputStreamReader(process.getInputStream(), "GBK")); |
| | | er = new BufferedReader(new InputStreamReader(process.getErrorStream(), "GBK")); |
| | | |
| | | String errorLine; |
| | | while ((errorLine = er.readLine()) != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | public String getKeyFrame(DataPo data) throws Exception { |
| | | String cmd = config.getKeyFrameBat() + " " + config.getInPath() + File.separator + data.getInPath() + File.separator + ".save" + File.separator + data.getInPath() + ".sww"; |
| | | |
| | | String str = exec(cmd); |
| | | if (StringHelper.isEmpty(str) || !str.contains("[")) { |
| | | throw new Exception("生成关键帧出错"); |
| | | } |
| | | |
| | | String rs = str.split("\\[", 2)[1].replace("]", "").replace(" ", ""); |
| | | if (StringHelper.isEmpty(rs)) { |
| | | throw new Exception("关键帧为空"); |
| | | } |
| | | |
| | | return rs; |
| | | } |
| | | |
| | | public void copeWaterFiles() { |
| | | // |
| | | } |