收集字节输出接收器
public class CollectingByteOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.Object | |
↳ | com.android.tradefed.device.CollectingByteOutputReceiver |
一个IShellOutputReceiver
将整个 shell 输出收集到一个byte[]
中。这对于将产生大量输出的 shell 命令非常有用,其中 2x 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 |