android,在文件中找一个String
来源:互联网 发布:terminator2.2.min.js 编辑:程序博客网 时间:2024/04/29 23:48
private String getVersion(String key) {
if (new File("/etc/version.conf").exists()) {
try {
BufferedReader reader = new BufferedReader(new FileReader(
"/etc/version.conf"), 1024);
String a = "";
try {
while ((a = reader.readLine()) != null) {
if (a.indexOf(key) != -1) {// || a.indexOf(key2) != -1
return a.substring(a.indexOf(',') + 1, a.length());
}
}
} finally {
reader.close();
}
} catch (IOException e) {
Log.e("SDAC",
"IO Exception when getting kernel version for Device Info screen",
e);
}
}
return "";
}
if (new File("/etc/version.conf").exists()) {
try {
BufferedReader reader = new BufferedReader(new FileReader(
"/etc/version.conf"), 1024);
String a = "";
try {
while ((a = reader.readLine()) != null) {
if (a.indexOf(key) != -1) {// || a.indexOf(key2) != -1
return a.substring(a.indexOf(',') + 1, a.length());
}
}
} finally {
reader.close();
}
} catch (IOException e) {
Log.e("SDAC",
"IO Exception when getting kernel version for Device Info screen",
e);
}
}
return "";
}
- android,在文件中找一个String
- 在Android String文件中使用CDATA
- 在有序数组中,找一个数字
- 在IE临时文件夹中找文件
- Shell在文件中找指定字符串
- egrep在文件中找IP地址
- Android 在定义string的xml文件中插入空格
- android在String资源文件中加入符号
- 在一个字符串中找一个最大重复子串
- 在一个字符串中找一个最大重复子串
- 在string.xml文件中定义一个字符串,然后在代码中通过String.format方法来格式化该字符串
- 将一个文件中的内容存储在一个String字符串中
- android直接找一个文件,部分编译等实用
- android直接找一个文件,部分编译等实用
- 在一个已知的字符串中找最长单词
- 在一个整型数组中找孤立的数字
- 在杨氏矩阵中找一个数
- Android 在strings文件中xliff的一个使用方法
- Cocos2d基于CCProgressTimer的倒计时进度条
- Customize the default local user profile when preparing an image of Windows
- huffman 树
- Lua入门
- Linux常用命令汇总
- android,在文件中找一个String
- webmin开启ssl后文件管理器无法登录问题
- 2012-7-18 ListView Header的使用
- Bitset 的用法
- VMware网络配置详解
- 2012-7-18 在ListView中显示不同的ITEM
- 好的android开源项目
- tom猫变声原理解析
- python学习笔记之wxpython打印预览