Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
ICompressionStrategy
public
interface
ICompressionStrategy
com.android.tradefed.util.ICompressionStrategy
|
Known indirect subclasses
|
An interface representing a compression algorithm that can be selected at runtime.
Summary
Public methods |
abstract
File
|
compress(File source)
Compresses the source file (or folder) and returns the resulting archive.
|
abstract
LogDataType
|
getLogDataType()
Returns the LogDataType of the archive format used by this strategy.
|
Public methods
compress
public abstract File compress (File source)
Compresses the source
file (or folder) and returns the resulting archive.
Parameters |
source |
File : The file or directory to compress |
Returns |
File |
The compressed archive |
Throws |
|
If the operation could not be completed |
getLogDataType
public abstract LogDataType getLogDataType ()
Returns the LogDataType
of the archive format used by this strategy.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 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 |"]]