public static File createFileForSchema ( String ddlText ) throws IOException { File temp = File . createTempFile ( "literalschema" , ".sql" ) ; temp . deleteOnExit ( ) ; FileWriter out = new FileWriter ( temp ) ; out . write ( ddlText ) ; out . close ( ) ; return temp ; }
Creates a temporary file for the supplied schema text . The file is not left open and will be deleted upon process exit .