Created
October 22, 2015 03:38
-
-
Save masud-technope/bb1d4082c16e6604d8c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
File myFile = new File(fileName); | |
if(!myFile.exists()){ | |
System.err.println("File does not exist: "+ fileName); | |
} | |
BufferedReader reader = new BufferedReader(new FileReader(myFile)); | |
while (reader.ready()) { | |
String line = reader.readLine(); | |
content += line + "\n"; | |
} | |
reader.close(); | |
} catch (Exception e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment