Reader reader = null;
BufferedReader br = null;
try {
reader = new FileReader("D:\\shop.txt");
br = new BufferedReader(reader);
StringBuffer sb = new StringBuffer();
String data = null;
while ((data = br.readLine()) != null) {
sb.append(data);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
reader.close();
br.close();
} catch (Exception e) {
e.printStackTrace();
}
}
BufferedReader br = null;
try {
reader = new FileReader("D:\\shop.txt");
br = new BufferedReader(reader);
StringBuffer sb = new StringBuffer();
String data = null;
while ((data = br.readLine()) != null) {
sb.append(data);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
reader.close();
br.close();
} catch (Exception e) {
e.printStackTrace();
}
}