Android-向hashmap添加字符串

Android-向hashmap添加字符串,android,string,hashmap,buffer,Android,String,Hashmap,Buffer,我目前正在将dictionary.png(一个文本文件)读入缓冲区。 .png使android认为它是压缩的 InputStream is = getResources().openRawResource(R.raw.dictionary); try { BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF8")); String next

我目前正在将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
            }
我不太熟悉
哈希映射
,但我想将字典中的文件读入哈希映射


任何帮助都将不胜感激。

一个与您所问内容类似的示例: