【发布时间】:2011-07-30 10:24:59
【问题描述】:
我目前正在将一个 dictionary.png(它是一个文本文件)读入缓冲区。 .png 让 android 认为它是压缩的。
InputStream is = getResources().openRawResource(R.raw.dictionary);
try {
BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF8"));
String next;
while ((next = br.readLine()) != null) {
//Add the string next to a map or whatever
}
} catch (Exception e) {
//Something nasty happened
}
我对@987654322@ 不是很熟悉,但我想将字典中的文件读入哈希映射。
任何帮助将不胜感激。
【问题讨论】:
标签: android string hashmap buffer