LargeOutputReceiver
public class LargeOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.object | |
↳ | com.android.tradefed.device.LargeOutputReceiver |
A class designed to help run long running commands collect output.
The maximum size of the tmp file is limited to approximately maxFileSize
. To prevent data loss when the limit has been reached, this file keeps set of tmp host files.
خلاصه
سازندگان عمومی | |
---|---|
LargeOutputReceiver (String descriptor, String serialNumber, long maxDataSize) Creates a |
روش های عمومی | |
---|---|
void | addOutput (byte[] data, int offset, int length) |
void | cancel () Cancels the command. |
void | clear () Delete currently accumulated data, and then re-create a new file. |
void | delete () Delete all accumulated data. |
void | flush () |
InputStreamSource | getData () Gets the collected output as a |
InputStreamSource | getData (int maxBytes) Gets the last maxBytes of collected output as a |
InputStreamSource | getData (int maxBytes, int offset) Gets the last maxBytes of collected output as a |
boolean | isCancelled ()
|
سازندگان عمومی
LargeOutputReceiver
public LargeOutputReceiver (String descriptor, String serialNumber, long maxDataSize)
Creates a LargeOutputReceiver
.
مولفه های | |
---|---|
descriptor | String : the descriptor of the command to run. For logging only. |
serialNumber | String : the serial number of the device. For logging only. |
maxDataSize | long : the approximate max amount of data to keep. |
روش های عمومی
addOutput
public void addOutput (byte[] data, int offset, int length)
مولفه های | |
---|---|
data | byte |
offset | int |
length | int |
لغو
public void cancel ()
Cancels the command.
روشن
public void clear ()
Delete currently accumulated data, and then re-create a new file.
حذف
public void delete ()
Delete all accumulated data.
flush
public void flush ()
دریافت داده
public InputStreamSource getData ()
Gets the collected output as a InputStreamSource
.
برمی گرداند | |
---|---|
InputStreamSource | The collected output from the command. |
دریافت داده
public InputStreamSource getData (int maxBytes)
Gets the last maxBytes of collected output as a InputStreamSource
.
مولفه های | |
---|---|
maxBytes | int : the maximum amount of data to return. Should be an amount that can comfortably fit in memory |
برمی گرداند | |
---|---|
InputStreamSource | The collected output from the command, stored in memory |
دریافت داده
public InputStreamSource getData (int maxBytes, int offset)
Gets the last maxBytes of collected output as a InputStreamSource
.
مولفه های | |
---|---|
maxBytes | int : the maximum amount of data to return. Should be an amount that can comfortably fit in memory |
offset | int : The offset of when to start getting the data from the buffer. |
برمی گرداند | |
---|---|
InputStreamSource | The collected output from the command, stored in memory |
isCancelled
public boolean isCancelled ()
برمی گرداند | |
---|---|
boolean |