लार्जआउटपुटरिसीवर

public class LargeOutputReceiver
extends Object implements IShellOutputReceiver

java.lang.ऑब्जेक्ट
com.android.tradefed.device.LargeOutputReceiver


लंबे समय तक चलने वाले कमांड को आउटपुट एकत्र करने में मदद करने के लिए डिज़ाइन किया गया एक वर्ग।

Tmp फ़ाइल का अधिकतम आकार लगभग maxFileSize तक सीमित है। सीमा पूरी होने पर डेटा हानि को रोकने के लिए, यह फ़ाइल tmp होस्ट फ़ाइलों का सेट रखती है।

सारांश

सार्वजनिक निर्माणकर्ता

LargeOutputReceiver (String descriptor, String serialNumber, long maxDataSize)

एक LargeOutputReceiver बनाता है।

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

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

void cancel ()

आदेश रद्द करता है.

void clear ()

वर्तमान में संचित डेटा हटाएं, और फिर एक नई फ़ाइल दोबारा बनाएं।

void delete ()

सभी संचित डेटा हटाएँ.

void flush ()

InputStreamSource getData ()

एकत्रित आउटपुट को InputStreamSource के रूप में प्राप्त करता है।

InputStreamSource getData (int maxBytes)

एकत्रित आउटपुट के अंतिम maxBytes InputStreamSource के रूप में प्राप्त करता है।

InputStreamSource getData (int maxBytes, int offset)

एकत्रित आउटपुट के अंतिम maxBytes InputStreamSource के रूप में प्राप्त करता है।

boolean isCancelled ()

सार्वजनिक निर्माणकर्ता

लार्जआउटपुटरिसीवर

public LargeOutputReceiver (String descriptor, 
                String serialNumber, 
                long maxDataSize)

एक LargeOutputReceiver बनाता है।

पैरामीटर
descriptor String : चलाने के लिए कमांड का डिस्क्रिप्टर। केवल लॉगिंग के लिए.

serialNumber String : डिवाइस का सीरियल नंबर. केवल लॉगिंग के लिए.

maxDataSize long : रखने के लिए डेटा की अनुमानित अधिकतम मात्रा।

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

addOutput

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

पैरामीटर
data byte

offset int

length int

रद्द करना

public void cancel ()

आदेश रद्द करता है.

स्पष्ट

public void clear ()

वर्तमान में संचित डेटा हटाएं, और फिर एक नई फ़ाइल दोबारा बनाएं।

मिटाना

public void delete ()

सभी संचित डेटा हटाएँ.

लालिमा

public void flush ()

डेटा प्राप्त करें

public InputStreamSource getData ()

एकत्रित आउटपुट को InputStreamSource के रूप में प्राप्त करता है।

रिटर्न
InputStreamSource कमांड से एकत्रित आउटपुट।

डेटा प्राप्त करें

public InputStreamSource getData (int maxBytes)

एकत्रित आउटपुट के अंतिम maxBytes InputStreamSource के रूप में प्राप्त करता है।

पैरामीटर
maxBytes int : लौटाए जाने वाले डेटा की अधिकतम मात्रा। ऐसी राशि होनी चाहिए जो मेमोरी में आराम से फिट हो सके

रिटर्न
InputStreamSource कमांड से एकत्रित आउटपुट, मेमोरी में संग्रहीत

डेटा प्राप्त करें

public InputStreamSource getData (int maxBytes, 
                int offset)

एकत्रित आउटपुट के अंतिम maxBytes InputStreamSource के रूप में प्राप्त करता है।

पैरामीटर
maxBytes int : लौटाए जाने वाले डेटा की अधिकतम मात्रा। ऐसी राशि होनी चाहिए जो मेमोरी में आराम से फिट हो सके

offset int : बफ़र से डेटा कब प्राप्त करना शुरू करना है इसकी ऑफसेट।

रिटर्न
InputStreamSource कमांड से एकत्रित आउटपुट, मेमोरी में संग्रहीत

रद्द कर दिया है

public boolean isCancelled ()

रिटर्न
boolean