Hello,
I am reading a file:
FileReader fr = null;
BufferedReader br = null;
fr = new FileReader(this.resource.toString());
br = new BufferedReader(fr);
String sCurrentLine;
String fullFile = "";
while (null != (sCurrentLine = br.readLine())) {
System.out.println("line" + sCurrentLine);
fullFile += sCurrentLine + "\n";
}
The original file content is:
#tue Feb 20 08:40:24 WET 2018
DataEngineFactory=dummy.app.EngineFactory
PersistCache=false
LoginLocale=en_GBbrand
ServiceRoot=https://nextgen-wlws.conceptsoftware.eu:9075/
SessionTimeout=3600
Debug=true
CustProvider=true
CacheSize=1000
But in console log it is printing:

If you see the ServiceRoot property (which is supposed to be an URL) it added backslashes before ':' (do not mind the LoginLocale property, it was deliberately changed to teste).
Why is that happening.
I thought it could be the BufferedReader class, but i tried with others too and all give same output:
//with scanner
Scanner sc = new Scanner(this.resource);
while (sc.hasNextLine()) {
sCurrentLine = sc.nextLine();
System.out.println("scanner" + sCurrentLine);
fullFile += sCurrentLine + "\\n";
}
//with apache commons
fullFile = FileUtils.readFileToString(new File(this.resource.toString()));
Can you help me?
Thanks
Carlos