public class ShellCommand
extends java.lang.Object
This class must be kept gcj
-compatible.
コンストラクタ | 説明 |
---|---|
ShellCommand() |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
execute(java.lang.String shellCommand) |
推奨されていません。
unused
|
boolean |
executeAndWait(java.lang.String shellCommand) |
推奨されていません。
unused
|
boolean |
executeAndWaitTimed(java.lang.String shellCommand,
int seconds) |
推奨されていません。
unused
|
void |
executeSilent(java.lang.String shellCommand) |
推奨されていません。
unused
|
boolean |
executeSilentAndWait(java.lang.String shellCommand) |
Passes a command to the shell for execution.
|
boolean |
executeSilentAndWaitTimed(java.lang.String[] commandArray,
int seconds) |
Passes a command to the shell for execution.
|
boolean |
executeSilentAndWaitTimed(java.lang.String shellCommand,
int seconds) |
Passes a command to the shell for execution.
|
java.io.InputStream |
getErrorStream() |
推奨されていません。
unused
|
java.io.InputStream |
getInputStream() |
推奨されていません。
unused
|
java.io.OutputStream |
getOutputStream() |
推奨されていません。
unused
|
static void |
main(java.lang.String[] args) |
Just does exec, this is NOT a test of ShellCommand.
|
@Deprecated public void execute(java.lang.String shellCommand)
STDOUT
and STDERR
as appropriate, and can be read via getOutputStream()
and
getErrorStream()
, respectively. Input can be passed to the
STDIN
of the shell process via getInputStream()
.
Warning, no good way to quote or escape spaces in arguments with this method.shellCommand
- The command for the shell to execute.@Deprecated public boolean executeAndWait(java.lang.String shellCommand)
STDOUT
and
STDERR
as appropriate, and can be read via
getOutputStream()
and getErrorStream()
, respectively.
Input can be passed to the STDIN
of the shell process via
getInputStream()
.
Warning, no good way to quote or escape spaces in arguments with this method.shellCommand
- The command for the shell to execute.true
if the spawned shell process
returns an exit status of 0 (indicating success),
else false
.@Deprecated public boolean executeAndWaitTimed(java.lang.String shellCommand, int seconds)
STDOUT
and STDERR
as appropriate, and can be read via getOutputStream()
and
getErrorStream()
, respectively. Input can be passed to the
STDIN
of the shell process via getInputStream()
.
Warning, no good way to quote or escape spaces in arguments with this method.shellCommand
- The command for the shell to execute.seconds
- The method will return true
if this
number of seconds elapses without the process
returning an exit status. A value of 0
here disables waiting.true
if the spawned shell process
returns an exit status of 0 (indicating success),
else false
.@Deprecated public void executeSilent(java.lang.String shellCommand) throws java.io.IOException
shellCommand
- The command for the shell to execute.java.io.IOException
public boolean executeSilentAndWait(java.lang.String shellCommand)
shellCommand
- The command for the shell to execute.true
if the spawned shell process
returns an exit status of 0 (indicating success),
else false
.public boolean executeSilentAndWaitTimed(java.lang.String shellCommand, int seconds)
shellCommand
- The command for the shell to execute, as a String.
You can't quote arguments successfully.
See Runtime.exec(String) for more info.seconds
- The method will return true
if this
number of seconds elapses without the process
returning an exit status. A value of 0
here disables waiting.true
if the spawned shell process
returns an exit status of 0 (indicating success),
OR if the time expires,
else false
.public boolean executeSilentAndWaitTimed(java.lang.String[] commandArray, int seconds)
commandArray
- The command for the shell to execute,
as a String[].
See Runtime.exec(String[]) for more info.seconds
- The method will return true
if this
number of seconds elapses without the process
returning an exit status. A value of 0
here disables waiting.true
if the spawned shell process
returns an exit status of 0 (indicating success),
OR if the time expires,
else false
.@Deprecated public java.io.InputStream getErrorStream()
@Deprecated public java.io.InputStream getInputStream()
@Deprecated public java.io.OutputStream getOutputStream()
public static void main(java.lang.String[] args)