از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
گیرنده Ilogcat
public interface ILogcatReceiver
com.android.tradefed.device.ILogcatReceiver |
زیر کلاس های غیر مستقیم شناخته شده |
کلاسی که خروجی logcat یک دستگاه را به عنوان InputStreamSource
ارائه می کند.
خلاصه
روش های عمومی
روشن
public abstract void clear ()
getLogcatData
public InputStreamSource getLogcatData (int maxBytes,
int offset)
بافر logcat فعلی را با یک افست برمی گرداند.
پارامترها |
---|
maxBytes | int : حداکثر اندازه بافر برگشتی |
offset | int : افست بافر کامل. |
شروع کنید
public abstract void start ()
توقف کنید
public abstract void stop ()
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# ILogcatReceiver\n===============\n\n\n`\npublic\n\n\ninterface\nILogcatReceiver\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------|\n| com.android.tradefed.device.ILogcatReceiver |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [LogcatReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LogcatReceiver.html) |--------------------------------------------------------------------------------------------------------|-------------------------------------------| | [LogcatReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LogcatReceiver.html) | Class that collects logcat in background. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA class that provides the output of a device's logcat as an [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html).\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[clear](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#clear())`() ` |\n| ` default `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData(int,%20int))`(int maxBytes, int offset) ` Returns the current logcat buffer given an offset. |\n| ` abstract `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData(int))`(int maxBytes) ` |\n| ` abstract `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData())`() ` |\n| ` abstract void` | ` `[start](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#start())`() ` |\n| ` abstract void` | ` `[stop](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#stop())`() ` |\n\nPublic methods\n--------------\n\n### clear\n\n```\npublic abstract void clear ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### getLogcatData\n\n```\npublic InputStreamSource getLogcatData (int maxBytes, \n int offset)\n```\n\nReturns the current logcat buffer given an offset.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------------------------|\n| `maxBytes` | `int`: The max size of the returned buffer \u003cbr /\u003e |\n| `offset` | `int`: The offset of the full buffer. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | The logcat buffer starting at the offset. \u003cbr /\u003e |\n\n### getLogcatData\n\n```\npublic abstract InputStreamSource getLogcatData (int maxBytes)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------|\n| `maxBytes` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### getLogcatData\n\n```\npublic abstract InputStreamSource getLogcatData ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### start\n\n```\npublic abstract void start ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### stop\n\n```\npublic abstract void stop ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]