I use this piece of code to create a temporary file:
String tmpDirectoryOp = System.getProperty("java.io.tmpdir"); File tmpDirectory = new File(tmpDirectoryOp); File fstream = File.createTempFile("tmpDirectory",".flv", tmpDirectory); FileOutputStream fos = new FileOutputStream(fstream); DataOutputStream dos=new DataOutputStream(fos); dos.writeChars("Write something"); fstream.deleteOnExit(); fos.close(); dos.close();
But in my project folder there is no tmpDirectory.flv . The write suggestion is in a loop that takes quite a while, so the problem is not that the file was deleted before I could see it.
Any ideas? thanks in advance
source share