Polecenie Wynik
public class CommandResult
extends Object
java.lang.Object | |
com.android.tradefed.util.CommandResult |
Zawiera wynik polecenia.
Streszczenie
Konstruktorzy publiczni | |
---|---|
CommandResult () Utwórz | |
CommandResult ( CommandStatus status) Utwórz |
Metody publiczne | |
---|---|
Integer | getExitCode () Pobierz kod wyjścia/powrotu wygenerowany przez polecenie. |
CommandStatus | getStatus () Uzyskaj status polecenia. |
String | getStderr () Uzyskaj standardowe wyjście błędu generowane przez polecenie. |
String | getStdout () Pobierz standardowe wyjście utworzone przez polecenie. |
void | setExitCode (int exitCode) |
void | setStatus ( CommandStatus status) |
void | setStderr (String stderr) |
void | setStdout (String stdout) |
String | toString () Zwraca ciąg reprezentujący ten obiekt. |
Konstruktorzy publiczni
Polecenie Wynik
public CommandResult ()
Utwórz CommandResult
z domyślnym statusem CommandStatus#TIMED_OUT
.
Polecenie Wynik
public CommandResult (CommandStatus status)
Utwórz CommandResult
z podanym stanem.
Parametry | |
---|---|
status | CommandStatus : CommandStatus |
Metody publiczne
pobierz kod wyjścia
public Integer getExitCode ()
Pobierz kod wyjścia/powrotu wygenerowany przez polecenie.
Zwroty | |
---|---|
Integer | kod wyjścia lub null , jeśli nie jest ustawiony |
uzyskaj status
public CommandStatus getStatus ()
Uzyskaj status polecenia.
Zwroty | |
---|---|
CommandStatus | CommandStatus |
getStderr
public String getStderr ()
Pobierz standardowe wyjście błędu generowane przez polecenie.
Zwroty | |
---|---|
String | błąd standardowy lub null , jeśli nie można pobrać danych wyjściowych |
getStdout
public String getStdout ()
Pobierz standardowe wyjście utworzone przez polecenie.
Zwroty | |
---|---|
String | standardowe wyjście lub null , jeśli nie można pobrać wyjścia |
ustaw kod wyjścia
public void setExitCode (int exitCode)
Parametry | |
---|---|
exitCode | int |
setStderr
public void setStderr (String stderr)
Parametry | |
---|---|
stderr | String |
setStdout
public void setStdout (String stdout)
Parametry | |
---|---|
stdout | String |
toString
public String toString ()
Zwraca ciąg reprezentujący ten obiekt. Stdout/err może być bardzo duży.
Zwroty | |
---|---|
String |