コード例 #1
0
 protected String readXmlFromFile(String location) throws IOException {
   BufferedReader reader =
       new BufferedReader(
           new FileReader("com/monsanto/tcc/viper/io/deerac/test/files/" + location));
   StringBuffer buffer = new StringBuffer();
   String line;
   while ((line = reader.readLine()) != null) {
     buffer.append(line);
   }
   reader.close();
   return buffer.toString();
 }
コード例 #2
0
 private static boolean isAaptPresent() throws Exception {
   boolean result = true;
   try {
     Process proc = Runtime.getRuntime().exec("aapt");
     BufferedReader br = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
     String line = null;
     while ((line = br.readLine()) != null) {}
   } catch (Exception ex) {
     result = false;
   }
   return result;
 }