code: public static File getCopy(String name, InputStream input)
      {
          Check.notNull(name);
          Check.notNull(input);
  
          final String prefix;
          final String suffix;
          final int minimumPrefix = 3;
          final int i = name.lastIndexOf(Constant.DOT);
          if (i > minimumPrefix)
          {
              prefix = name.substring(0, i);
              suffix = name.substring(i);
          }
          else
          {
              if (name.length() > minimumPrefix)
              {
                  prefix = name;
              }
              else
              {
                  prefix = PREFIX_TEMP;
              }
              suffix = null;
          }
          try
          {
              final File temp = File.createTempFile(prefix, suffix);
              try (OutputStream output = new BufferedOutputStream(new FileOutputStream(temp)))
              {
                  copy(input, output);
              }
              return temp;
          }
          catch (final IOException exception)
          {
              throw new LionEngineException(exception, ERROR_TEMP_FILE + name);
          }
      }
docs: Get of full copy of the input stream stored in a temporary file.
  
  @param name The file name reference, to have a similar temporary file name (must not be <code>null</code>).
  @param input The input stream reference (must not be <code>null</code>).
  @return The temporary file created with copied content from stream.
  @throws LionEngineException If invalid arguments or invalid stream.