code: public static void replaceTokensInStream(
              final InputStream stream,
              final MultiDataContext<ContextView, DataContext> dataContext,
              final ScriptfileUtils.LineEndingStyle style,
              final File destination,
              final String nodeName
      )
              throws IOException
      {
          if (null == stream) {
              throw new NullPointerException("stream cannot be null");
          }
          replaceTokensInReader(
                  new InputStreamReader(stream),
                  dataContext,
                  style,
                  destination, nodeName
          );
      }
docs: Copies the source stream to a temp file or specific destination, replacing the @key.X@ tokens
  with the values from the data context
  
  @param stream      source stream
  @param dataContext input data context
  @param style       script file line ending style to use
  @param destination destination file
  
  @throws java.io.IOException on io error