com.android.ddmlib
Class NullOutputReceiver

java.lang.Object
  extended by com.android.ddmlib.NullOutputReceiver
All Implemented Interfaces:
IShellOutputReceiver

public final class NullOutputReceiver
extends Object
implements IShellOutputReceiver

Implementation of IShellOutputReceiver that does nothing.

This can be used to execute a remote shell command when the output is not needed.


Constructor Summary
NullOutputReceiver()
           
 
Method Summary
 void addOutput(byte[] data, int offset, int length)
          Called every time some new data is available.
 void flush()
          Called at the end of the process execution (unless the process was canceled).
static IShellOutputReceiver getReceiver()
           
 boolean isCancelled()
          Cancel method to stop the execution of the remote shell command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullOutputReceiver

public NullOutputReceiver()
Method Detail

getReceiver

public static IShellOutputReceiver getReceiver()

addOutput

public void addOutput(byte[] data,
                      int offset,
                      int length)
Description copied from interface: IShellOutputReceiver
Called every time some new data is available.

Specified by:
addOutput in interface IShellOutputReceiver
Parameters:
data - The new data.
offset - The offset at which the new data starts.
length - The length of the new data.

flush

public void flush()
Description copied from interface: IShellOutputReceiver
Called at the end of the process execution (unless the process was canceled). This allows the receiver to terminate and flush whatever data was not yet processed.

Specified by:
flush in interface IShellOutputReceiver

isCancelled

public boolean isCancelled()
Description copied from interface: IShellOutputReceiver
Cancel method to stop the execution of the remote shell command.

Specified by:
isCancelled in interface IShellOutputReceiver
Returns:
true to cancel the execution of the command.


Copyright © 2008-2012. All Rights Reserved.