org.openqa.selenium.os
Class CommandLine

java.lang.Object
  extended by org.openqa.selenium.os.CommandLine

public class CommandLine
extends java.lang.Object


Constructor Summary
CommandLine(java.lang.String[] cmdarray)
           
CommandLine(java.lang.String executable, java.lang.String... args)
           
 
Method Summary
 void copyOutputTo(java.io.OutputStream out)
           
 void destroy()
           
 void execute()
           
 java.lang.Process executeAsync()
           
static java.lang.String findExecutable(java.lang.String named)
          Find the executable by scanning the file system and the PATH.
 int getExitCode()
           
static java.lang.String getLibraryPathPropertyName()
           
 java.lang.String getStdOut()
           
 boolean isSuccessful()
           
 void setDynamicLibraryPath(java.lang.String newLibraryPath)
           
 void setEnvironmentVariable(java.lang.String name, java.lang.String value)
          Adds the specified environment variable.
 void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environment)
          Adds the specified environment variables.
 void setInput(java.lang.String allInput)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandLine

public CommandLine(java.lang.String executable,
                   java.lang.String... args)

CommandLine

public CommandLine(java.lang.String[] cmdarray)
Method Detail

setEnvironmentVariables

public void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environment)
Adds the specified environment variables.

Parameters:
environment - the variables to add
Throws:
java.lang.IllegalArgumentException - if any value given is null (unsupported)

setEnvironmentVariable

public void setEnvironmentVariable(java.lang.String name,
                                   java.lang.String value)
Adds the specified environment variable.

Parameters:
name - the name of the environment variable
value - the value of the environment variable
Throws:
java.lang.IllegalArgumentException - if the value given is null (unsupported)

setDynamicLibraryPath

public void setDynamicLibraryPath(java.lang.String newLibraryPath)

getLibraryPathPropertyName

public static java.lang.String getLibraryPathPropertyName()
Returns:
The platform specific env property name which contains the library path.

findExecutable

public static java.lang.String findExecutable(java.lang.String named)
Find the executable by scanning the file system and the PATH. In the case of Windows this method allows common executable endings (".com", ".bat" and ".exe") to be omitted.

Parameters:
named - The name of the executable to find
Returns:
The absolute path to the executable, or null if no match is made.

execute

public void execute()

executeAsync

public java.lang.Process executeAsync()

isSuccessful

public boolean isSuccessful()

getExitCode

public int getExitCode()

getStdOut

public java.lang.String getStdOut()

destroy

public void destroy()

setInput

public void setInput(java.lang.String allInput)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

copyOutputTo

public void copyOutputTo(java.io.OutputStream out)


Copyright © 2011. All Rights Reserved.