CollectingByteOutputReceiver
public
class
CollectingByteOutputReceiver
extends Object
implements
IShellOutputReceiver
java.lang.Object | |
↳ | com.android.tradefed.device.CollectingByteOutputReceiver |
A IShellOutputReceiver
which collects the whole shell output into a byte[]
.
This is useful for shell commands that will produce a significant amount of output, where the
2x String
memory overhead will be significant.
Summary
Public constructors | |
---|---|
CollectingByteOutputReceiver()
|
Public methods | |
---|---|
void
|
addOutput(byte[] data, int offset, int length)
|
void
|
cancel()
Cancel the output collection |
void
|
clear()
Try to unref everything that we can |
void
|
flush()
|
byte[]
|
getOutput()
|
boolean
|
isCancelled()
|
Public constructors
CollectingByteOutputReceiver
public CollectingByteOutputReceiver ()
Public methods
addOutput
public void addOutput (byte[] data, int offset, int length)
Parameters | |
---|---|
data |
byte |
offset |
int |
length |
int |
cancel
public void cancel ()
Cancel the output collection
clear
public void clear ()
Try to unref everything that we can
flush
public void flush ()
getOutput
public byte[] getOutput ()
Returns | |
---|---|
byte[] |
isCancelled
public boolean isCancelled ()
Returns | |
---|---|
boolean |