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) |
パブリックメソッド | |
---|---|
void | addOutput (byte[] data, int offset, int length) |
void | cancel () コマンドをキャンセルします。 |
void | clear () 現在蓄積されているデータを削除してから、新しいファイルを再作成してください。 |
void | delete () 蓄積されたデータをすべて削除します。 |
void | flush () |
InputStreamSource | getData () 収集された出力を |
InputStreamSource | getData (int maxBytes) 収集された出力の最後のmaxBytesを |
InputStreamSource | getData (int maxBytes, int offset) 収集された出力の最後のmaxBytesを |
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)
収集された出力の最後のmaxBytesをInputStreamSource
として取得します。
パラメーター | |
---|---|
maxBytes | int :返すデータの最大量。メモリに快適に収まる量である必要があります |
戻り値 | |
---|---|
InputStreamSource | コマンドから収集され、メモリに保存された出力 |
getData
public InputStreamSource getData (int maxBytes, int offset)
収集された出力の最後のmaxBytesをInputStreamSource
として取得します。
パラメーター | |
---|---|
maxBytes | int :返すデータの最大量。メモリに快適に収まる量である必要があります |
offset | int :バッファからデータの取得を開始するタイミングのオフセット。 |
戻り値 | |
---|---|
InputStreamSource | コマンドから収集され、メモリに保存された出力 |
isCancelled
public boolean isCancelled ()
戻り値 | |
---|---|
boolean |