FileOuputStream is not working (Windows 7)
in
Programming Questions
•
3 years ago
Hello. I have written a program that saves some data into a file on a disk. The problem is that FileOutputStream does not create a file..
- void Save(String path, aFile saveFile)
- {
- FileOutputStream fileOut = null;
- DataOutputStream dataOut = null;
- try
- {
- fileOut = new FileOutputStream(path);
- dataOut = new DataOutputStream(fileOut);
- }
- catch (FileNotFoundException e)
- {
- System.out.println(e);
- }
- //Starting writing.
- //marker - file beginning
- print("START WRITING FILE\nWriting beginner marker...");
- dataOut.writeInt(0xFFFFFFFF);
- println("OK");
- //code goes on...
- }
PS: UAC is disabled. Tried to run as administrator either..
1
