CollectingOutputReceiver

public class CollectingOutputReceiver
extends Object implements IShellOutputReceiver

java.lang.Object
   ↳ com.android.ddmlib.CollectingOutputReceiver


एक IShellOutputReceiver, जो पूरे शेल आउटपुट को एक String में इकट्ठा करता है.

खास जानकारी

पब्लिक कंस्ट्रक्टर

CollectingOutputReceiver()
CollectingOutputReceiver(CountDownLatch commandCompleteLatch)

सार्वजनिक तरीके

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

जब भी कोई नया डेटा उपलब्ध होता है, तब इस फ़ंक्शन को कॉल किया जाता है.

boolean awaitCompletion(long timeout, TimeUnit unit)
void cancel()

आउटपुट कलेक्शन को रद्द करता है.

void flush()

इस फ़ंक्शन को प्रोसेस के खत्म होने पर कॉल किया जाता है. हालांकि, अगर प्रोसेस रद्द कर दी गई है, तो इसे कॉल नहीं किया जाता.

String getOutput()
boolean isCancelled()

रिमोट शेल कमांड को बंद करने के लिए, cancel तरीके का इस्तेमाल करें.

boolean isComplete()

पब्लिक कंस्ट्रक्टर

CollectingOutputReceiver

public CollectingOutputReceiver ()

CollectingOutputReceiver

public CollectingOutputReceiver (CountDownLatch commandCompleteLatch)

पैरामीटर
commandCompleteLatch CountDownLatch

सार्वजनिक तरीके

addOutput

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

जब भी कोई नया डेटा उपलब्ध होता है, तब इस फ़ंक्शन को कॉल किया जाता है.

पैरामीटर
data byte: नया डेटा.

offset int: वह ऑफ़सेट जहां से नया डेटा शुरू होता है.

length int: नए डेटा की लंबाई.

awaitCompletion

public boolean awaitCompletion (long timeout, 
                TimeUnit unit)

पैरामीटर
timeout long

unit TimeUnit

रिटर्न
boolean

अभी नहीं

public void cancel ()

आउटपुट कलेक्शन को रद्द करता है.

फ़्लश

public void flush ()

इस फ़ंक्शन को प्रोसेस के खत्म होने पर कॉल किया जाता है. हालांकि, अगर प्रोसेस रद्द कर दी गई है, तो इसे कॉल नहीं किया जाता. इससे, डेटा पाने वाले व्यक्ति को उस डेटा को बंद करने और हटाने की अनुमति मिलती है जिसे अब तक प्रोसेस नहीं किया गया है.

getOutput

public String getOutput ()

रिटर्न
String

isCancelled

public boolean isCancelled ()

रिमोट शेल कमांड को बंद करने के लिए, cancel तरीके का इस्तेमाल करें.

रिटर्न
boolean कमांड को रद्द करने के लिए, इस वैल्यू को true पर सेट करें.

isComplete

public boolean isComplete ()

रिटर्न
boolean