NullOutputReceiver
public
final
class
NullOutputReceiver
extends Object
implements
IShellOutputReceiver
| java.lang.Object | |
| ↳ | com.android.ddmlib.NullOutputReceiver |
IShellOutputReceiver 的實作,不執行任何操作。
這可用於在不需要輸出內容時,執行遠端殼層指令。
摘要
公用建構函式 | |
|---|---|
NullOutputReceiver()
|
|
公用方法 | |
|---|---|
void
|
addOutput(byte[] data, int offset, int length)
每次有新資料可用時,系統就會呼叫這個方法。 |
void
|
flush()
在程序執行結束時呼叫 (除非程序已取消)。 |
static
IShellOutputReceiver
|
getReceiver()
|
boolean
|
isCancelled()
Cancel 方法:停止執行遠端殼層指令。 |
公用建構函式
NullOutputReceiver
public NullOutputReceiver ()
公用方法
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:取消執行指令。 |