private File createTemporaryFile ( String filename ) throws HelloSignException { String prefix = filename . substring ( 0 , filename . indexOf ( "." ) ) ; String postfix = filename . substring ( filename . indexOf ( "." ) + 1 , filename . length ( ) ) ; if ( prefix == null || postfix == null ) { throw new HelloSignException ( "Invalid file name: " + prefix + "." + postfix ) ; } File f = null ; try { f = File . createTempFile ( prefix , "." + postfix ) ; } catch ( Exception ex ) { throw new HelloSignException ( ex ) ; } return f ; }
Helper method to create a temporary file .