Google is committed to advancing racial equity for Black communities. See how.

ShellOutputReceiverStream

public final class ShellOutputReceiverStream
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.ShellOutputReceiverStream


Utility subclass of OutputStream that writes into an IShellOutputReceiver.

Summary

Public constructors

ShellOutputReceiverStream(IShellOutputReceiver receiver)

Create a new adapter for the given IShellOutputReceiver.

Public methods

void write(byte[] b)
void write(byte[] b, int off, int len)
void write(int b)

Public constructors

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver)

Create a new adapter for the given IShellOutputReceiver.

It is valid to provide a null receiver here to simplify code using the adapter, i.e. so that it can use this with try-with-resources without checking for a null receiver itself. If receiver is null, ERROR(/#getOutputStream()) will also return null.

Parameters
receiver IShellOutputReceiver

Public methods

write

public void write (byte[] b)

Parameters
b byte

write

public void write (byte[] b, 
                int off, 
                int len)

Parameters
b byte

off int

len int

write

public void write (int b)

Parameters
b int