code: public static File writeScriptTempfile(
              final Framework framework,
              final InputStream stream,
              final String source,
              final Reader reader,
              final LineEndingStyle style
      ) throws IOException
      {
          /*
           * Prepare a file to save the content
           */
          final File scriptfile = createTempFile(framework);
  
          writeScriptFile(stream, source, reader, style, scriptfile);
  
          return scriptfile;
      }
docs: Copy a source stream or string content to a tempfile for script execution
  
  @param framework framework
  @param stream    source stream
  @param source    content
  @param style     file line ending style to use
  @param reader reader
  
  @return tempfile
  
  @throws IOException if an error occurs