Package com.itextpdf.testutils
Class CompareToolUtil
java.lang.Object
com.itextpdf.testutils.CompareToolUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic voidCreates a copy of a file.static StringcreateTempCopy(String file, String tempFilePrefix, String tempFilePostfix) Creates a temporary copy of a file.static StringcreateTempDirectory(String tempFilePrefix) Creates a temporary directory.prepareProcessArguments(String exec, String params) static booleanremoveFiles(String[] paths) Removes all of the passed files.static ProcessrunProcess(String execPath, String params)
-
Field Details
-
SPLIT_REGEX
- See Also:
-
-
Constructor Details
-
CompareToolUtil
public CompareToolUtil()
-
-
Method Details
-
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 copiedtempFilePrefix- the prefix of the copied file's nametempFilePostfix- the postfix of the copied file's name- Returns:
- the path to the copied file
- Throws:
IOException
-
copy
Creates a copy of a file.- Parameters:
inputFile- the path to the file to be copiedoutputFile- the path, to which the passed file should be copied- Throws:
IOException
-
createTempDirectory
Creates a temporary directory.- Parameters:
tempFilePrefix- the prefix of the temporary directory's name- Returns:
- the path to the temporary directory
- Throws:
IOException
-
removeFiles
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
-
runProcess
public static Process runProcess(String execPath, String params) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
prepareProcessArguments
-
splitIntoProcessArguments
-
buildPath
-