CollectingOutputReceiver
public
class
CollectingOutputReceiver
extends Object
implements
IShellOutputReceiver
| java.lang.Object | |
| ↳ | com.android.ddmlib.CollectingOutputReceiver |
シェル出力全体を 1 つの String に収集する IShellOutputReceiver。
概要
パブリック コンストラクタ | |
|---|---|
CollectingOutputReceiver()
|
|
CollectingOutputReceiver(CountDownLatch commandCompleteLatch)
|
|
パブリック メソッド | |
|---|---|
void
|
addOutput(byte[] data, int offset, int length)
新しいデータが利用可能になるたびに呼び出されます。 |
boolean
|
awaitCompletion(long timeout, TimeUnit unit)
|
void
|
cancel()
出力の収集をキャンセルします。 |
void
|
flush()
プロセスの実行の終了時に呼び出されます(プロセスがキャンセルされた場合を除く)。 |
String
|
getOutput()
|
boolean
|
isCancelled()
リモートシェル コマンドの実行を停止するキャンセル メソッド。 |
boolean
|
isComplete()
|
パブリック コンストラクタ
CollectingOutputReceiver
public CollectingOutputReceiver ()
CollectingOutputReceiver
public CollectingOutputReceiver (CountDownLatch commandCompleteLatch)
| パラメータ | |
|---|---|
commandCompleteLatch |
CountDownLatch |
パブリック メソッド
addOutput
public void addOutput (byte[] data,
int offset,
int length)新しいデータが利用可能になるたびに呼び出されます。
| パラメータ | |
|---|---|
data |
byte: 新しいデータ。 |
offset |
int: 新しいデータの開始オフセット。 |
length |
int: 新しいデータの長さ。 |
awaitCompletion
public boolean awaitCompletion (long timeout,
TimeUnit unit)| パラメータ | |
|---|---|
timeout |
long |
unit |
TimeUnit |
| 戻り値 | |
|---|---|
boolean |
|
キャンセル
public void cancel ()
出力コレクションをキャンセルします。
フラッシュ
public void flush ()
プロセスの実行終了時に呼び出されます(プロセスがキャンセルされた場合を除く)。これにより、受信側はまだ処理されていないデータを終了してフラッシュできます。
getOutput
public String getOutput ()
| 戻り値 | |
|---|---|
String |
|
isCancelled
public boolean isCancelled ()
リモートシェル コマンドの実行を停止するキャンセル メソッド。
| 戻り値 | |
|---|---|
boolean |
コマンドの実行をキャンセルする場合は true。 |
isComplete
public boolean isComplete ()
| 戻り値 | |
|---|---|
boolean |
|