コード例 #1
0
ファイル: ErrorReportEmail.java プロジェクト: WindFi/fqrouter
 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 "";
 }
コード例 #2
0
ファイル: MainActivity.java プロジェクト: ruobin/fqrouter
 static {
     IOUtils.createCommonDirs();
 }