收集字節輸出接收器
public class CollectingByteOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.Object | |
↳ | com.android.tradefed.device.CollectingByteOutputReceiver |
一個IShellOutputReceiver
,它將整個 shell 輸出收集到一個byte[]
中。這對於將產生大量輸出的 shell 命令很有用,其中 2x ERROR(/String)
內存開銷將很大。
概括
公共構造函數 | |
---|---|
CollectingByteOutputReceiver () |
公共方法 | |
---|---|
void | addOutput (byte[] data, int offset, int length) |
void | cancel () 取消輸出收集 |
void | clear () 嘗試取消引用我們能做的一切 |
void | flush () |
byte[] | getOutput () |
boolean | isCancelled ()
|
公共構造函數
收集字節輸出接收器
public CollectingByteOutputReceiver ()
公共方法
添加輸出
public void addOutput (byte[] data, int offset, int length)
參數 | |
---|---|
data | byte |
offset | int |
length | int |
取消
public void cancel ()
取消輸出收集
清除
public void clear ()
嘗試取消引用我們能做的一切
齊平
public void flush ()
得到輸出
public byte[] getOutput ()
退貨 | |
---|---|
byte[] |
取消
public boolean isCancelled ()
退貨 | |
---|---|
boolean |