I'm trying to write a file path or URL to a text file.
String myString = "http://example.com:96";
FileOutputStream fos = new FileOutputStream(fileName);
fos.write(myString.getBytes());
I wonder why the back slash is written to the file even though we don't need an escape char for a forward slash??
http:\/\/example.com:96
(note that if I read back the URL string to a java program and print to the console, I don't see the back slash anymore. http://example.com:96 )
Is there a way to omit the back slash character?