Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
ICompressionStrategy
public
interface
ICompressionStrategy
com.android.tradefed.util.ICompressionStrategy
|
Subclass tidak langsung yang umum
|
Antarmuka yang mewakili algoritma kompresi yang dapat dipilih saat runtime.
Ringkasan
Metode publik |
abstract
File
|
compress(File source)
Mengompresi file (atau folder) source dan menampilkan arsip yang dihasilkan.
|
abstract
LogDataType
|
getLogDataType()
Menampilkan LogDataType format arsip yang digunakan oleh strategi ini.
|
Metode publik
kompresi
public abstract File compress (File source)
Mengompresi file (atau folder) source
dan menampilkan arsip yang dihasilkan.
Parameter |
source |
File : File atau direktori yang akan dikompresi |
Hasil |
File |
Arsip terkompresi |
Menampilkan |
|
Jika operasi tidak dapat diselesaikan |
getLogDataType
public abstract LogDataType getLogDataType ()
Menampilkan LogDataType
format arsip yang digunakan oleh strategi ini.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# ICompressionStrategy\n====================\n\n\n`\npublic\n\n\ninterface\nICompressionStrategy\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------|\n| com.android.tradefed.util.ICompressionStrategy |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [ZipCompressionStrategy](../../../../../../reference/tradefed/com/android/tradefed/util/ZipCompressionStrategy.html) |----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | [ZipCompressionStrategy](../../../../../../reference/tradefed/com/android/tradefed/util/ZipCompressionStrategy.html) | An [ICompressionStrategy](../../../../../../reference/tradefed/com/android/tradefed/util/ICompressionStrategy.html) for creating zip archives. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn interface representing a compression algorithm that can be selected at runtime.\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract File` | ` `[compress](../../../../../../reference/tradefed/com/android/tradefed/util/ICompressionStrategy.html#compress(File))`(File source) ` Compresses the `source` file (or folder) and returns the resulting archive. |\n| ` abstract `[LogDataType](../../../../../../reference/tradefed/com/android/tradefed/result/LogDataType.html) | ` `[getLogDataType](../../../../../../reference/tradefed/com/android/tradefed/util/ICompressionStrategy.html#getLogDataType())`() ` Returns the [LogDataType](../../../../../../reference/tradefed/com/android/tradefed/result/LogDataType.html) of the archive format used by this strategy. |\n\nPublic methods\n--------------\n\n### compress\n\n```\npublic abstract File compress (File source)\n```\n\nCompresses the `source` file (or folder) and returns the resulting archive.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|--------------------------------------------------|\n| `source` | `File`: The file or directory to compress \u003cbr /\u003e |\n\n| Returns ||\n|--------|-------------------------------|\n| `File` | The compressed archive \u003cbr /\u003e |\n\n| Throws ||\n|---|-----------------------------------------|\n| | If the operation could not be completed |\n\n### getLogDataType\n\n```\npublic abstract LogDataType getLogDataType ()\n```\n\nReturns the [LogDataType](../../../../../../reference/tradefed/com/android/tradefed/result/LogDataType.html) of the archive format used by this strategy.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------|--------|\n| [LogDataType](../../../../../../reference/tradefed/com/android/tradefed/result/LogDataType.html) | \u003cbr /\u003e |"]]