/**
* @param fileName
* @return assets中文件的字符串
*/
public String getFromAssets(Context context, String fileName) {
StringBuffer buffer = new StringBuffer();
try {
InputStream is = context.getResources().getAssets().open(fileName);
InputStreamReader inputReader = new InputStreamReader(is);
BufferedReader bufReader = new BufferedReader(inputReader);
String line = "";
while ((line = bufReader.readLine()) != null) {
buffer.append(line);
}
} catch (Exception e) {
e.printStackTrace();
}
return buffer.toString();
}