27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
বড় আউটপুট রিসিভার
public class LargeOutputReceiver
extends Object
implements IShellOutputReceiver
java.lang.অবজেক্ট |
↳ | com.android.tradefed.device.LargeOutputReceiver |
দীর্ঘ চলমান কমান্ড চালাতে সাহায্য করার জন্য ডিজাইন করা একটি ক্লাস আউটপুট সংগ্রহ করে।
tmp ফাইলের সর্বোচ্চ আকার প্রায় maxFileSize
এর মধ্যে সীমাবদ্ধ। সীমা পৌঁছে গেলে ডেটা ক্ষতি রোধ করতে, এই ফাইলটি tmp হোস্ট ফাইলের সেট রাখে।
সারাংশ
পাবলিক পদ্ধতি |
---|
void | addOutput (byte[] data, int offset, int length) |
void | cancel () আদেশ বাতিল করে। |
void | clear () বর্তমানে জমে থাকা ডেটা মুছুন এবং তারপরে একটি নতুন ফাইল পুনরায় তৈরি করুন। |
void | delete () সমস্ত জমে থাকা ডেটা মুছুন। |
void | flush () |
InputStreamSource | getData () একটি InputStreamSource হিসাবে সংগৃহীত আউটপুট পায়। |
InputStreamSource | getData (int maxBytes) একটি InputStreamSource হিসাবে সংগৃহীত আউটপুটের শেষ maxBytes পায়। |
InputStreamSource | getData (int maxBytes, int offset) একটি InputStreamSource হিসাবে সংগৃহীত আউটপুটের শেষ maxBytes পায়। |
boolean | isCancelled () |
পাবলিক কনস্ট্রাক্টর
বড় আউটপুট রিসিভার
public LargeOutputReceiver (String descriptor,
String serialNumber,
long maxDataSize)
একটি LargeOutputReceiver
তৈরি করে।
পরামিতি |
---|
descriptor | String : চালানোর কমান্ডের বর্ণনাকারী। শুধুমাত্র লগিং জন্য. |
serialNumber | String : ডিভাইসের সিরিয়াল নম্বর। শুধুমাত্র লগিং জন্য. |
maxDataSize | long : আনুমানিক সর্বোচ্চ পরিমাণ ডেটা রাখতে হবে। |
পাবলিক পদ্ধতি
যোগ আউটপুট
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)
একটি InputStreamSource
হিসাবে সংগৃহীত আউটপুটের শেষ maxBytes পায়।
পরামিতি |
---|
maxBytes | int : ফেরত দিতে সর্বোচ্চ পরিমাণ ডেটা। মেমরিতে আরামে ফিট করতে পারে এমন পরিমাণ হওয়া উচিত |
রিটার্নস |
---|
InputStreamSource | কমান্ড থেকে সংগৃহীত আউটপুট, মেমরিতে সংরক্ষিত |
getData
public InputStreamSource getData (int maxBytes,
int offset)
একটি InputStreamSource
হিসাবে সংগৃহীত আউটপুটের শেষ maxBytes পায়।
পরামিতি |
---|
maxBytes | int : ফেরত দিতে সর্বোচ্চ পরিমাণ ডেটা। মেমরিতে আরামে ফিট করতে পারে এমন পরিমাণ হওয়া উচিত |
offset | int : কখন বাফার থেকে ডেটা পাওয়া শুরু করতে হবে তার অফসেট। |
রিটার্নস |
---|
InputStreamSource | কমান্ড থেকে সংগৃহীত আউটপুট, মেমরিতে সংরক্ষিত |
বাতিল করা হয়েছে
public boolean isCancelled ()
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 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 |"]]