StringBuffer content = new StringBuffer();
// FileInputStream fis = null;
// byte[] b = new byte[2048];
// try {
// if(lang!=null&&lang.trim().equals("10")){
// fis = new FileInputStream(passwordTemplatePath);
// }else if(lang!=null&&lang.trim().equals("20")){
// fis = new FileInputStream(passwordTemplateEnPath);
// }else if(lang!=null&&lang.trim().equals("30")){
// fis = new FileInputStream(passwordTemplateChinaEnPath);
// }
// int m = 0;
// while ((m = fis.read(b)) != -1) {
// content.append(new String(b, 0, m));
// }
//passwordTemplatePath 文本 文件地址
BufferedReader br = null;
try {
if(lang!=null&&lang.trim().equals("10")){
br = new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplatePath), "utf-8"));
}else if(lang!=null&&lang.trim().equals("20")){
br = new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplateEnPath), "utf-8"));
}else if(lang!=null&&lang.trim().equals("30")){
br = new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplateChinaEnPath), "utf-8"));
}
String s = null;
while ((s = br.readLine()) != null) {
content.append(s);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}