Revision: 58588
Updated Code
at July 23, 2012 14:15 by l01241
Updated Code
/// Read plist from Assets
private String readPlistFromAssets(Context context, String path) {
StringBuffer sb = new StringBuffer();
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(context.getAssets().open(path)));
String temp;
while ((temp = br.readLine()) != null)
sb.append(temp);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
br.close(); // stop reading
} catch (IOException ex) {
ex.printStackTrace();
}
}
return sb.toString();
}
Revision: 58587
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 23, 2012 14:11 by l01241
Initial Code
/// Read plist from Assets
private String readPlistFromAssets(Context context, String path) {
StringBuffer sb = new StringBuffer();
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(context.getAssets().open(path)));
String temp;
while ((temp = br.readLine()) != null)
sb.append(temp);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
br.close(); // stop reading
} catch (IOException ex) {
ex.printStackTrace();
}
}
return sb.toString();
}
Initial URL
Initial Description
http://kpbird.blogspot.hk/2011/08/android-plist-parser.html
Initial Title
android Plist parser xml Assets
Initial Tags
xml, android
Initial Language
Java