Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.jdeveloper.vcs.util
Class VCSProcessUtils

java.lang.Object
  extended by oracle.jdeveloper.vcs.util.VCSProcessUtils

public final class VCSProcessUtils
extends java.lang.Object

Utility class for assisting with external commands and processes.

Since:
9.0.5

Method Summary
static java.lang.String[] createEnvironmentParams(java.util.Map<java.lang.String,java.lang.String> envp)
          Creates a string array specification of environment parameters.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

splitCommandArgumentURLs

public static final 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. By splitting arguments in this way consumers can make use of the time in between running commands to perform updates to progress indication and check for user cancellation. It also helps to ensure that the command-line buffer limit (NT) is not exceeded.

Parameters:
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.
Returns:
the array of string lists, splitting original arguments.

createEnvironmentParams

public static final java.lang.String[] createEnvironmentParams(java.util.Map<java.lang.String,java.lang.String> envp)
Creates a string array specification of environment parameters. These may be supplied to a process runner in the setEnvironmentParams() method.

Parameters:
envp - a map of environment variable names and values.
Returns:
the string array specification of environment variables.

sendInputData

public static final void sendInputData(java.lang.Process process,
                                       java.lang.String data,
                                       boolean close)
                                throws java.io.IOException
Sends the given data as input to the process.

Parameters:
data - the data for writing to the process's output stream.
close - trueclose the input stream, false don't close the input stream.
Throws:
java.io.IOException - if an I/O error occurs.

sendInputData

public static final void sendInputData(java.lang.Process process,
                                       java.lang.String data)
                                throws java.io.IOException
Sends the given data as input to the process.

Parameters:
data - the data for writing to the process's output stream.
Throws:
java.io.IOException - if an I/O error occurs.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.