读取配置文件
(String fileName)
| 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(); |
no outgoing calls
no test coverage detected