日期:2014-05-20 浏览次数:20759 次
public static void main(String[]args){
File qfile = new File("D:/sendexcel/report1/sql1.txt");
FileInputStream fis = null;
try {
fis = new FileInputStream(qfile);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
InputStreamReader reader = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(reader );
String query = null;
try {
query = br.readLine();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
while((query=br.readLine())!=null){
System.out.println(query);
}