LargeOutputReceiver
public class LargeOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.オブジェクト | |
↳ | 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 : 保持するデータのおおよその最大量。 |
パブリックメソッド
追加出力
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 ()
データの取得
public InputStreamSource getData ()
収集された出力をInputStreamSource
として取得します。
戻り値 | |
---|---|
InputStreamSource | コマンドから収集された出力。 |
データの取得
public InputStreamSource getData (int maxBytes)
収集された出力の最後のmaxBytesをInputStreamSource
として取得します。
パラメーター | |
---|---|
maxBytes | int : 返されるデータの最大量。メモリに無理なく収まる量である必要があります |
戻り値 | |
---|---|
InputStreamSource | コマンドから収集され、メモリに保存された出力 |
データの取得
public InputStreamSource getData (int maxBytes, int offset)
収集された出力の最後のmaxBytesをInputStreamSource
として取得します。
パラメーター | |
---|---|
maxBytes | int : 返されるデータの最大量。メモリに無理なく収まる量である必要があります |
offset | int : バッファからのデータの取得を開始するオフセット。 |
戻り値 | |
---|---|
InputStreamSource | コマンドから収集され、メモリに保存された出力 |
キャンセルされました
public boolean isCancelled ()
戻り値 | |
---|---|
boolean |