I am trying to open files with FileInputStream that have whitespaces in their names.
For example:
String fileName = \"This is my file.txt\"; String
Looks like you have a problem rather with the file separator than the whitespace in your file names. Have you tried using
System.getProperty("file.separator")
instead of your '/' in the path variable?