public static File createTempFile ( final String prefix , final String suffix ) { try { File tempFile = File . createTempFile ( prefix , suffix ) ; if ( tempFile . exists ( ) ) { if ( ! tempFile . delete ( ) ) throw new RuntimeException ( "Could not delete new temp file: " + tempFile ) ; } return tempFile ; } catch ( IOException e ) { log . error ( "[FileHelper] {createTempFile} Error creating temp file: " + e . getMessage ( ) , e ) ; return null ; } }
Creates a temporary file name