Created
August 12, 2019 01:58
-
-
Save cnmoro/85ab14b7b1edd257e7fd56dcbe6f1cc5 to your computer and use it in GitHub Desktop.
Java create temporary io.File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String text = "This is a text to be written on the temporary file."; | |
File tempFile = File.createTempFile("tempFilePrefix", "tempFileSuffix", null); | |
FileOutputStream fos = new FileOutputStream(tempFile); | |
fos.write(text.getBytes()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment