ShellOutputReceiverStream

public final class ShellOutputReceiverStream
extends OutputStream

java.lang.Object
   ↳ java.io.OutputStream
     ↳ 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 ()

例外
IOException

フラッシュ(する)

public void flush ()

例外
IOException

write

public void write (byte[] b)

パラメータ
b byte

write

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

パラメータ
b byte

off int

len int

write

public void write (int b)

パラメータ
b int