收集輸出接收器
public class CollectingOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.Object | |
↳ | com.android.tradefed.device.CollectingOutputReceiver |
一個IShellOutputReceiver
,它將整個 shell 輸出收集到一個String
中。
概括
公共構造函數 | |
---|---|
CollectingOutputReceiver () |
公共方法 | |
---|---|
void | addOutput (byte[] data, int offset, int length) |
void | cancel () 取消輸出集合 |
void | clearBuffer () 清除緩衝區的內容。 |
void | flush () |
String | getOutput () |
boolean | isCancelled ()
|
公共構造函數
收集輸出接收器
public CollectingOutputReceiver ()
公共方法
添加輸出
public void addOutput (byte[] data, int offset, int length)
參數 | |
---|---|
data | byte |
offset | int |
length | int |
取消
public void cancel ()
取消輸出集合
清除緩衝區
public void clearBuffer ()
清除緩衝區的內容。
沖水
public void flush ()
獲取輸出
public String getOutput ()
退貨 | |
---|---|
String |
取消
public boolean isCancelled ()
退貨 | |
---|---|
boolean |