public final class VCSProcessUtils
extends java.lang.Object
Utility class for assisting with external commands and processes.
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
createEnvironmentParams(java.util.Map<java.lang.String,java.lang.String> envp)
Creates a string array specification of environment parameters.
|
static boolean |
productHandleNewFiles()
Some FCP products (SQL Developer) don't require vcs system to display the handle new files dialog
|
static void |
sendInputData(java.lang.Process process,
java.lang.String data)
Sends the given data as input to the process.
|
static void |
sendInputData(java.lang.Process process,
java.lang.String data,
boolean close)
Sends the given data as input to the process.
|
static java.net.URL[][] |
splitCommandArgumentURLs(java.net.URL[] arguments,
int maxArguments,
boolean usePaths)
Splits the given command arguments URLs such that they are suitable for
separate command invocations.
|
public static final java.net.URL[][] splitCommandArgumentURLs(java.net.URL[] arguments,
int maxArguments,
boolean usePaths)
arguments - the command argument URLs.maxArguments - the maximum number of arguments in each resulting list.
If this value is less than or equal to 0, no maximum is exercised.usePaths - whether to split the command arguments URLs based on paths
instead of filenames.public static final java.lang.String[] createEnvironmentParams(java.util.Map<java.lang.String,java.lang.String> envp)
setEnvironmentParams()
method.envp - a map of environment variable names and values.public static final void sendInputData(java.lang.Process process,
java.lang.String data,
boolean close)
throws java.io.IOException
data - the data for writing to the process's output stream.close - trueclose the input stream, false don't close
the input stream.java.io.IOException - if an I/O error occurs.public static final void sendInputData(java.lang.Process process,
java.lang.String data)
throws java.io.IOException
data - the data for writing to the process's output stream.java.io.IOException - if an I/O error occurs.public static boolean productHandleNewFiles()