Class CompareToolUtil


  • public class CompareToolUtil
    extends Object
    • Constructor Detail

      • CompareToolUtil

        public CompareToolUtil()
    • Method Detail

      • createTempCopy

        public static String createTempCopy​(String file,
                                            String tempFilePrefix,
                                            String tempFilePostfix)
                                     throws IOException
        Creates a temporary copy of a file.
        Parameters:
        file - the path to the file to be copied
        tempFilePrefix - the prefix of the copied file's name
        tempFilePostfix - the postfix of the copied file's name
        Returns:
        the path to the copied file
        Throws:
        IOException
      • copy

        public static void copy​(String inputFile,
                                String outputFile)
                         throws IOException
        Creates a copy of a file.
        Parameters:
        inputFile - the path to the file to be copied
        outputFile - the path, to which the passed file should be copied
        Throws:
        IOException
      • createTempDirectory

        public static String createTempDirectory​(String tempFilePrefix)
                                          throws IOException
        Creates a temporary directory.
        Parameters:
        tempFilePrefix - the prefix of the temporary directory's name
        Returns:
        the path to the temporary directory
        Throws:
        IOException
      • removeFiles

        public static boolean removeFiles​(String[] paths)
        Removes all of the passed files.
        Parameters:
        paths - paths to files, which should be removed
        Returns:
        true if all the files have been successfully removed, false otherwise
      • prepareProcessArguments

        public static List<String> prepareProcessArguments​(String exec,
                                                           String params)
      • splitIntoProcessArguments

        public static List<String> splitIntoProcessArguments​(String line)