public interface ICommonJobs
Modifier and Type | Method and Description |
---|---|
void |
destroyProcess()
Destroys a potentially executing process.
|
File |
downloadExtractArchive(File jarExe,
File tempDir,
String url,
File dest)
Creates a temporary folder and downloads and extracts an archive file that contains a single directory with some name.
|
void |
downloadFile(String webFile,
File destFile)
Download a file using HTTP.
|
default int |
exec(boolean showOutput,
File dir,
Map<String,String> env,
StringBuilder output,
List<String> commands)
Executes a short command, typically for testing.
|
default int |
exec(boolean showOutput,
File dir,
Map<String,String> env,
StringBuilder output,
String... commands)
Executes a short command, typically for testing.
|
int |
exec(boolean showOutput,
String echo,
File dir,
Map<String,String> env,
StringBuilder output,
String... commands)
Executes a short command, typically for testing.
|
void |
extractArchive(File jarExe,
File archive,
File dest,
boolean deleteArchive)
Extracts an archive file.
|
void destroyProcess()
void downloadFile(String webFile, File destFile) throws IOException, InterruptedException
webFile
- The web file using HTTP.destFile
- The local file system file where to place it.IOException
- For errors.InterruptedException
- If the process is interrupted.void extractArchive(File jarExe, File archive, File dest, boolean deleteArchive) throws IOException, InterruptedException
jarExe
- The Jar executable.archive
- The file to extract.dest
- The directory to place the extracted files in.deleteArchive
- Flag to delete the archive.IOException
- For errors.InterruptedException
- If the process is interrupted.File downloadExtractArchive(File jarExe, File tempDir, String url, File dest) throws IOException, InterruptedException
jarExe
- The Jar executable.tempDir
- The temporary directory.url
- The archive file's URL to download.dest
- The destination directory.IOException
InterruptedException
default int exec(boolean showOutput, File dir, Map<String,String> env, StringBuilder output, String... commands) throws IOException, InterruptedException
showOutput
- Shows the output of the process.dir
- Current directory for the process.env
- The environment to use, null for default.output
- The StringBuilder that is filled with the output from the process.commands
- Commands to execute.IOException
- For errors.InterruptedException
- If the process is interrupted.default int exec(boolean showOutput, File dir, Map<String,String> env, StringBuilder output, List<String> commands) throws IOException, InterruptedException
showOutput
- Shows the output of the process.dir
- Current directory for the process.env
- The environment to use, null for default.output
- The StringBuilder that is filled with the output from the process.commands
- Commands to execute.IOException
- For errors.InterruptedException
- If the process is interrupted.int exec(boolean showOutput, String echo, File dir, Map<String,String> env, StringBuilder output, String... commands) throws IOException, InterruptedException
showOutput
- Shows the output of the process.echo
- If non-null, what is placed in the output stream.dir
- Current directory for the process.env
- The environment to use, null for default.output
- The StringBuilder that is filled with the output from the process.commands
- Commands to execute.IOException
- For errors.InterruptedException
- If the process is interrupted.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.