//获得资源文件夹下的文本文件
public String getText(String name){
try {
//Return an AssetManager instance for your application's package
InputStream is = getAssets().open(name);
int size = is.available();
// Read the entire asset into a local byte buffer.
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
text = new String(buffer, "GB2312");
} catch (IOException e) {
// Should never happen!
throw new RuntimeException(e);
}
return text;
}