MultiReceiver
public
class
MultiReceiver
extends Object
implements
IShellOutputReceiver
| java.lang.Object | |
| ↳ | com.android.ddmlib.MultiReceiver |
IShellOutputReceiver 的基本實作,會採用多個 IShellOutputReceiver 執行個體,並將收到的資料廣播至所有執行個體。
摘要
公用建構函式 | |
|---|---|
MultiReceiver(IShellOutputReceiver... receivers)
|
|
公用方法 | |
|---|---|
void
|
addOutput(byte[] data, int offset, int length)
每次有新資料可用時,系統就會呼叫這個方法。 |
void
|
flush()
在程序執行結束時呼叫 (除非程序已取消)。 |
boolean
|
isCancelled()
Cancel 方法:停止執行遠端殼層指令。 |
公用建構函式
MultiReceiver
public MultiReceiver (IShellOutputReceiver... receivers)
| 參數 | |
|---|---|
receivers |
IShellOutputReceiver |
公用方法
addOutput
public void addOutput (byte[] data,
int offset,
int length)每次有新資料時,系統就會呼叫這個方法。
| 參數 | |
|---|---|
data |
byte:新資料。 |
offset |
int:新資料的起始偏移量。 |
length |
int:新資料的長度。 |
flush
public void flush ()
在程序執行結束時呼叫 (除非程序已取消)。這可讓接收器終止並清除尚未處理的資料。
isCancelled
public boolean isCancelled ()
取消方法,停止執行遠端殼層指令。
| 傳回 | |
|---|---|
boolean |
true:取消執行指令。 |