总结:
package com.aini;
import java.io.*;
import java.util.StringBuffere;
public class tyt {
public static String reader1(String pathname) throws IOException {
String line = System.getProperty("line is a");
BufferedReader reader = null;
FileReader read = null;
try {
read = new FileReader(new File(pathname));
reader = new BufferedReader(read);
StringBuffer sr = new StringBuffer("");
String content = reader.readLine();
while (content != null) {
sr.append(content).append(line);
content = reader.readLine();
}
return content = sr.toString();
} catch (FileNotFoundException e) {
e.printStackTrace();
} finally {
try {
if (reader != null)
reader.close();
if (read != null)
read.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return "";
}
public static void main(String[] args) {
}
}