How to read lines in a file using Java without losing the tabs, spaces in the beginning (indent)? I need this to read a sourcecode and than to print it out.
I am doing it like this:
br = new BufferedReader(new FileReader(filePath));
String line = null;
while ((line = br.readLine()) != null) {
aList.add(line);
}
(of course with try catch blocks)
Thank you!