CollectingByteOutputReceiver

public class CollectingByteOutputReceiver
extends Object implements IShellOutputReceiver

java.lang.Object
   ↳ com.android.tradefed.device.CollectingByteOutputReceiver


IShellOutputReceiver thu thập toàn bộ đầu ra của shell vào byte[]. Điều này hữu ích cho các lệnh shell sẽ tạo ra một lượng lớn đầu ra, trong đó mức hao tổn bộ nhớ String gấp 2 lần sẽ rất đáng kể.

Tóm tắt

Hàm khởi tạo công khai

CollectingByteOutputReceiver()

Phương thức công khai

void addOutput(byte[] data, int offset, int length)

void cancel()

Huỷ quá trình thu thập dữ liệu đầu ra

void clear()

Cố gắng huỷ tham chiếu mọi thứ có thể

void flush()

byte[] getOutput()
boolean isCancelled()

Hàm khởi tạo công khai

CollectingByteOutputReceiver

public CollectingByteOutputReceiver ()

Phương thức công khai

addOutput

public void addOutput (byte[] data, 
                int offset, 
                int length)

Tham số
data byte

offset int

length int

hủy

public void cancel ()

Huỷ quá trình thu thập dữ liệu đầu ra

xóa

public void clear ()

Cố gắng huỷ tham chiếu mọi thứ có thể

xả

public void flush ()

getOutput

public byte[] getOutput ()

Giá trị trả về
byte[]

isCancelled

public boolean isCancelled ()

Giá trị trả về
boolean