MCPcopy Create free account
hub / github.com/FeJQ/AUPK / readFileString

Method readFileString

frameworks/base/core/java/android/app/Aupk.java:442–462  ·  view source on GitHub ↗

读取配置文件

(String fileName)

Source from the content-addressed store, hash-verified

440 * 读取配置文件
441 */
442 public static String readFileString(String fileName)
443 {
444 FileInputStream fis=null;
445 try
446 {
447 File file = new File(fileName);
448 fis = new FileInputStream(file);
449 int length = fis.available();
450 byte[] buffer = new byte[length];
451 fis.read(buffer);
452 String str = new String(buffer);
453 fis.close();
454 return str;
455 }
456 catch (Exception e)
457 {
458 //e.printStackTrace();
459 //Log.e("AUPK", "ActivityThread:readFileString,read config file failed:" +e.getMessage()+";fileName:"+fileName);
460 }
461 return null;
462 }
463
464 private static native void native_fakeInvoke(Object method);
465 private static native void mapToFile();

Callers 3

runMethod · 0.95
aupkThreadClassesMethod · 0.95
performLaunchActivityMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected