हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
LargeOutputReceiver
public
class
LargeOutputReceiver
extends Object
implements
IShellOutputReceiver
java.lang.Object
|
↳ |
com.android.tradefed.device.LargeOutputReceiver
|
यह क्लास, लंबे समय तक चलने वाले कमांड चलाने और आउटपुट इकट्ठा करने में मदद करती है.
टेंप्लेट फ़ाइल का साइज़ ज़्यादा से ज़्यादा maxFileSize
तक हो सकता है.
तय सीमा पूरी होने पर डेटा को मिटने से बचाने के लिए, यह फ़ाइल टेंप्लेट होस्ट फ़ाइलों का सेट सेव रखती है.
खास जानकारी
सार्वजनिक तरीके |
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()
|
पब्लिक कंस्ट्रक्टर
LargeOutputReceiver
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 ()
getData
public InputStreamSource getData ()
इकट्ठा किए गए आउटपुट को InputStreamSource
के तौर पर पाता है.
रिटर्न |
InputStreamSource |
कमांड से इकट्ठा किया गया आउटपुट.
|
getData
public InputStreamSource getData (int maxBytes)
इकट्ठा किए गए आउटपुट के आखिरी maxBytes को InputStreamSource
के तौर पर दिखाता है.
पैरामीटर |
maxBytes |
int : दिखाए जाने वाले डेटा की ज़्यादा से ज़्यादा संख्या. यह ऐसी रकम होनी चाहिए जो आसानी से मेमोरी में सेव हो जाए |
रिटर्न |
InputStreamSource |
कमांड से इकट्ठा किया गया आउटपुट, मेमोरी में सेव किया जाता है
|
getData
public InputStreamSource getData (int maxBytes,
int offset)
इकट्ठा किए गए आउटपुट के आखिरी maxBytes को InputStreamSource
के तौर पर दिखाता है.
पैरामीटर |
maxBytes |
int : दिखाए जाने वाले डेटा की ज़्यादा से ज़्यादा संख्या. यह ऐसी रकम होनी चाहिए जो आसानी से मेमोरी में सेव हो जाए |
offset |
int : बफ़र से डेटा पाने की शुरुआत करने का ऑफ़सेट. |
रिटर्न |
InputStreamSource |
कमांड से इकट्ठा किया गया आउटपुट, मेमोरी में सेव किया जाता है
|
isCancelled
public boolean isCancelled ()
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# LargeOutputReceiver\n===================\n\n\n`\npublic\n\n\nclass\nLargeOutputReceiver\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\nIShellOutputReceiver\n\n\n`\n\n|---|-------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.device.LargeOutputReceiver |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA class designed to help run long running commands collect output.\n\n\nThe maximum size of the tmp file is limited to approximately `maxFileSize`.\nTo prevent data loss when the limit has been reached, this file keeps set of tmp host\nfiles.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[LargeOutputReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#LargeOutputReceiver(java.lang.String,%20java.lang.String,%20long))`(String descriptor, String serialNumber, long maxDataSize) ` Creates a [LargeOutputReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html). |\n\n| ### Public methods ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[addOutput](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#addOutput(byte[],%20int,%20int))`(byte[] data, int offset, int length) ` |\n| ` void` | ` `[cancel](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#cancel())`() ` Cancels the command. |\n| ` void` | ` `[clear](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#clear())`() ` Delete currently accumulated data, and then re-create a new file. |\n| ` void` | ` `[delete](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#delete())`() ` Delete all accumulated data. |\n| ` void` | ` `[flush](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#flush())`() ` |\n| ` InputStreamSource` | ` `[getData](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#getData())`() ` Gets the collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html). |\n| ` InputStreamSource` | ` `[getData](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#getData(int))`(int maxBytes) ` Gets the last \u003cvar translate=\"no\"\u003emaxBytes\u003c/var\u003e of collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html). |\n| ` InputStreamSource` | ` `[getData](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#getData(int,%20int))`(int maxBytes, int offset) ` Gets the last \u003cvar translate=\"no\"\u003emaxBytes\u003c/var\u003e of collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html). |\n| ` boolean` | ` `[isCancelled](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html#isCancelled())`() ` |\n\nPublic constructors\n-------------------\n\n### LargeOutputReceiver\n\n```\npublic LargeOutputReceiver (String descriptor, \n String serialNumber, \n long maxDataSize)\n```\n\nCreates a [LargeOutputReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LargeOutputReceiver.html).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|--------------------------------------------------------------------------|\n| `descriptor` | `String`: the descriptor of the command to run. For logging only. \u003cbr /\u003e |\n| `serialNumber` | `String`: the serial number of the device. For logging only. \u003cbr /\u003e |\n| `maxDataSize` | `long`: the approximate max amount of data to keep. \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### addOutput\n\n```\npublic void addOutput (byte[] data, \n int offset, \n int length)\n```\n\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------|\n| `data` | `byte` \u003cbr /\u003e |\n| `offset` | `int` \u003cbr /\u003e |\n| `length` | `int` \u003cbr /\u003e |\n\n### cancel\n\n```\npublic void cancel ()\n```\n\nCancels the command.\n\n\u003cbr /\u003e\n\n### clear\n\n```\npublic void clear ()\n```\n\nDelete currently accumulated data, and then re-create a new file.\n\n\u003cbr /\u003e\n\n### delete\n\n```\npublic void delete ()\n```\n\nDelete all accumulated data.\n\n\u003cbr /\u003e\n\n### flush\n\n```\npublic void flush ()\n```\n\n\n\u003cbr /\u003e\n\n### getData\n\n```\npublic InputStreamSource getData ()\n```\n\nGets the collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html).\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------|-----------------------------------------------|\n| `InputStreamSource` | The collected output from the command. \u003cbr /\u003e |\n\n### getData\n\n```\npublic InputStreamSource getData (int maxBytes)\n```\n\nGets the last \u003cvar translate=\"no\"\u003emaxBytes\u003c/var\u003e of collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------|\n| `maxBytes` | `int`: the maximum amount of data to return. Should be an amount that can comfortably fit in memory \u003cbr /\u003e |\n\n| Returns ||\n|---------------------|----------------------------------------------------------------|\n| `InputStreamSource` | The collected output from the command, stored in memory \u003cbr /\u003e |\n\n### getData\n\n```\npublic InputStreamSource getData (int maxBytes, \n int offset)\n```\n\nGets the last \u003cvar translate=\"no\"\u003emaxBytes\u003c/var\u003e of collected output as a [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------|\n| `maxBytes` | `int`: the maximum amount of data to return. Should be an amount that can comfortably fit in memory \u003cbr /\u003e |\n| `offset` | `int`: The offset of when to start getting the data from the buffer. \u003cbr /\u003e |\n\n| Returns ||\n|---------------------|----------------------------------------------------------------|\n| `InputStreamSource` | The collected output from the command, stored in memory \u003cbr /\u003e |\n\n### isCancelled\n\n```\npublic boolean isCancelled ()\n```\n\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |"]]