Hi,
I am trying to write a byte[] to a png file, but I get a FileNotFoundException every time I try for some reason.
File file = new File("C:/test.png");
System.err.println(file.exists());
FileOutputStream fos = new FileOutputStream("C:/test.png");
The file.exists() returns false every time, even though the file is there, I can see it in explorer or in a command prompt, and there is no double extension or anything like that either. When I print my exception I get:
java.io.FileNotFoundException: /C:/test.png
Why is that extra slash being added? Is that what's causing the problem?
Thanks!
- Devon -