LargeOutputReceiver

public class LargeOutputReceiver
extends Object implements IShellOutputReceiver

java.lang.Object
com.android.tradefed.device.LargeOutputReceiver


長時間実行されるコマンドを実行して出力を収集するのに役立つように設計されたクラス。

tmp ファイルの最大サイズは、およそmaxFileSizeに制限されています。制限に達したときのデータ損失を防ぐために、このファイルは tmp ホスト ファイルのセットを保持します。

まとめ

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

LargeOutputReceiver (String descriptor, String serialNumber, long maxDataSize)

LargeOutputReceiverを作成します。

公開メソッド

void addOutput (byte[] data, int offset, int length)

void cancel ()

コマンドをキャンセルします。

void clear ()

現在蓄積されているデータを削除してから、新しいファイルを作成し直してください。

void delete ()

蓄積されたデータをすべて削除します。

void flush ()

InputStreamSource getData ()

収集された出力をInputStreamSourceとして取得します。

InputStreamSource getData (int maxBytes)

収集された出力の最後のmaxBytesInputStreamSourceとして取得します。

InputStreamSource getData (int maxBytes, int offset)

収集された出力の最後のmaxBytesInputStreamSourceとして取得します。

boolean isCancelled ()

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

LargeOutputReceiver

public LargeOutputReceiver (String descriptor, 
                String serialNumber, 
                long maxDataSize)

LargeOutputReceiverを作成します。

パラメーター
descriptor String : 実行するコマンドの記述子。ロギングのみ。

serialNumber String : デバイスのシリアル番号。ロギングのみ。

maxDataSize long : 保持するデータのおおよその最大量。

公開メソッド

addOutput

public void addOutput (byte[] data, 
                int offset, 
                int length)

パラメーター
data byte

offset int

length int

キャンセル

public void cancel ()

コマンドをキャンセルします。

クリア

public void clear ()

現在蓄積されているデータを削除してから、新しいファイルを作成し直してください。

消去

public void delete ()

蓄積されたデータをすべて削除します。

流す

public void flush ()

getData

public InputStreamSource getData ()

収集された出力をInputStreamSourceとして取得します。

戻り値
InputStreamSourceコマンドから収集された出力。

getData

public InputStreamSource getData (int maxBytes)

収集された出力の最後のmaxBytesInputStreamSourceとして取得します。

パラメーター
maxBytes int : 返されるデータの最大量。メモリに快適に収まる量にする必要があります

戻り値
InputStreamSourceメモリに格納された、コマンドから収集された出力

getData

public InputStreamSource getData (int maxBytes, 
                int offset)

収集された出力の最後のmaxBytesInputStreamSourceとして取得します。

パラメーター
maxBytes int : 返されるデータの最大量。メモリに快適に収まる量にする必要があります

offset int : バッファからデータの取得を開始するときのオフセット。

戻り値
InputStreamSourceメモリに格納された、コマンドから収集された出力

キャンセルされました

public boolean isCancelled ()

戻り値
boolean