Created
July 24, 2018 11:52
-
-
Save Ikhiloya/30674680825e1f4549350d61474a5767 to your computer and use it in GitHub Desktop.
A code snippe t
This file contains hidden or 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
| public static List<String> getFile(String filePath) throws IOException { | |
| BufferedReader br = | |
| new BufferedReader(new FileReader | |
| (filePath)); | |
| List<String> lines = new ArrayList<String>(); | |
| // Read file line by line | |
| String line = ""; | |
| while ((line = br.readLine()) != null) { | |
| // Parse line to extract individual fields | |
| lines.add(line); | |
| } | |
| System.out.println("Done Reading from file"); | |
| br.close(); | |
| return lines; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment