Example #1
0
 private String copyLog(String logFileName) {
   File destFile = new File(LOG_DIR + "/" + logFileName);
   if (destFile.exists()) {
     destFile.delete();
   }
   try {
     FileInputStream inputStream = new FileInputStream("/data/data/fq.router2/log/" + logFileName);
     try {
       FileOutputStream outputStream = new FileOutputStream(LOG_DIR + "/" + logFileName);
       try {
         IOUtils.copy(inputStream, outputStream);
       } finally {
         outputStream.close();
       }
     } finally {
       inputStream.close();
     }
   } catch (Exception e) {
     LogUtils.e("failed to copy " + logFileName, e);
     return "\n" + "failed to copy " + logFileName + "\n" + e;
   }
   return "";
 }
Example #2
0
 static {
     IOUtils.createCommonDirs();
 }