@Immutable public static final class Shell.Fake extends Object implements Shell
It doesn't do anything, but imitates the behavior of a real shell, returning the code and the output provided in the ctor.
Shell.Empty, Shell.Fake, Shell.Plain, Shell.Safe, Shell.Verbose| Constructor and Description |
|---|
Fake()
Ctor.
|
Fake(int exit,
byte[] out,
byte[] err)
Ctor.
|
Fake(int exit,
String out,
String err)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
exec(String command,
InputStream stdin,
OutputStream sout,
OutputStream serr)
Execute and return exit code.
|
public Fake()
public Fake(int exit,
String out,
String err)
exit - Exit code to returnout - Stdout to returnerr - Stderr to returnpublic Fake(int exit,
byte[] out,
byte[] err)
exit - Exit code to returnout - Stdout to returnerr - Stderr to returnpublic int exec(String command, InputStream stdin, OutputStream sout, OutputStream serr) throws IOException
Shellexec in interface Shellcommand - Commandstdin - Stdin (will be closed)sout - Stdout (will be closed)serr - Stderr (will be closed)IOException - If failsCopyright © 2012–2018 jcabi.com. All rights reserved.