展开全部
public static String readFile(String filepath) {
StringBuffer string=new StringBuffer();
BufferedReader br=null;
try {
InputStreamReader isr = new InputStreamReader(new FileInputStream(filepath));
br=new BufferedReader(isr);
String line = null;
while((line=br.readLine())!= null){
string.append(line);
string.append("\n");
}
br.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return string.toString();
}
public static String rightStr(String str, int count) {
String result = "";
if (!strIsNull(str)) {
if (str.length() > count) {
result = str.substring(str.length() - count);
} else {
result = str;
}
}
return result;
}给两个方法你参考下e69da5e887aa3231313335323631343130323136353331333335333637