to top
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 CommandStatus: the CommandStatus

Public Methods

public CommandStatus getStatus ()

Get status of command.

Returns
CommandStatus the CommandStatus

public String getStderr ()

Get the standard error output produced by command.

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

public String getStdout ()

Get the standard output produced by command.

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

public void setStatus (CommandStatus status)

Parameters
status CommandStatus

public void setStderr (String stderr)

Parameters
stderr String

public void setStdout (String stdout)

Parameters
stdout String