BufferedReader reader;
try {
reader = new BufferedReader(new FileReader(new File(
"d:/kfk.txt")));
while ((str = reader.readLine()) != null) {
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}