ShellOutputReceiverStream

public final class ShellOutputReceiverStream
extends Object

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


IShellOutputReceiver に書き込む OutputStream のユーティリティ サブクラス。

概要

パブリック コンストラクタ

ShellOutputReceiverStream(IShellOutputReceiver receiver)

指定された IShellOutputReceiver の新しいアダプターを作成します。

ShellOutputReceiverStream(IShellOutputReceiver receiver, FileOutputStream fileOutput)

パブリック メソッド

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

パブリック コンストラクタ

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver)

指定された IShellOutputReceiver の新しいアダプターを作成します。

ここで null レシーバを指定して、アダプタを使用するコードを簡素化できます。つまり、null レシーバ自体を確認せずに、try-with-resources で使用できます。

パラメータ
receiver IShellOutputReceiver

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver, 
                FileOutputStream fileOutput)

パラメータ
receiver IShellOutputReceiver

fileOutput FileOutputStream

パブリック メソッド

閉じる

public void close ()

フラッシュ

public void flush ()

文章の作成

public void write (byte[] b)

パラメータ
b byte

文章の作成

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

パラメータ
b byte

off int

len int

文章の作成

public void write (int b)

パラメータ
b int