Advertisement
jbjares

pnosnippet

Feb 26th, 2015
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1.         Gson gson = new GsonBuilder().create();
  2.  
  3.         PAKCRestServiceTO simulationInstanceTO = gson.fromJson(PAKCRestServiceJSON, PAKCRestServiceTO.class);
  4.         FileUtils.writeByteArrayToFile(new File("PAK/input.cfg"), simulationInstanceTO.getCfgFile());
  5.        
  6.         SolverMessageTO solverMonitor = new SolverMessageTO();
  7.        
  8.         File pakcPakDat = new File("Pak.dat");
  9.         File pakcPakUnv = new File("Pak.unv");
  10.        
  11.         //Cad execution...
  12.        
  13.         byte[] pakcPakDatByteArr = org.apache.commons.io.FileUtils.readFileToByteArray(pakcPakDat);
  14.         byte[] pakcPakUnvByteArr = org.apache.commons.io.FileUtils.readFileToByteArray(pakcPakUnv);
  15.        
  16.        
  17.         simulationInstanceTO.setDatFile(pakcPakDatByteArr);
  18.         simulationInstanceTO.setUnvFile(pakcPakUnvByteArr);
  19.         String JSONReturn = Util.getJsonStrFromObject(simulationInstanceTO);
  20.        
  21.         return JSONReturn;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement