public class

CommandResult

extends Object
java.lang.Object
   ↳ com.android.tradefed.util.CommandResult

Class Overview

Contains the result of a command.

Summary

Public Constructors
CommandResult()
Create a CommandResult with the default TIMED_OUT status.
CommandResult(CommandStatus status)
Create a CommandResult with the given status.
Public Methods
CommandStatus getStatus()
Get status of command.
String getStderr()
Get the standard error output produced by command.
String getStdout()
Get the standard output produced by command.
void setStatus(CommandStatus status)
void setStderr(String stderr)
void setStdout(String stdout)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CommandResult ()

Create a CommandResult with the default TIMED_OUT status.

public CommandResult (CommandStatus status)

Create a CommandResult with the given status.

Parameters
status the CommandStatus

Public Methods

public CommandStatus getStatus ()

Get status of command.

Returns

public String getStderr ()

Get the standard error output produced by command.

Returns
  • the standard error or null if output could not be retrieved

public String getStdout ()

Get the standard output produced by command.

Returns
  • the standard output or null if output could not be retrieved

public void setStatus (CommandStatus status)

public void setStderr (String stderr)

public void setStdout (String stdout)