DataApi.GetFdForAssetResult
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From interface com.google.android.gms.common.api.Result
From interface
com.google.android.gms.common.api.Releasable
Public Methods
Returns a file descriptor for the requested asset.
Returns an input stream wrapping the file descriptor. When this input stream is
closed, the file descriptor is, as well.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-21 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 2024-11-21 UTC."],[[["\u003cp\u003e\u003ccode\u003eDataApi.GetFdForAssetResult\u003c/code\u003e is deprecated and developers should use \u003ccode\u003eDataClient.GetFdForAssetResponse\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eThis interface provides access to a file descriptor or input stream for a requested asset.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDataApi.GetFdForAssetResult\u003c/code\u003e object needs to be released after use to free up resources.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to obtain a \u003ccode\u003eParcelFileDescriptor\u003c/code\u003e or an \u003ccode\u003eInputStream\u003c/code\u003e for the asset.\u003c/p\u003e\n"]]],[],null,["# DataApi.GetFdForAssetResult\n\npublic static interface **DataApi.GetFdForAssetResult** implements [Result](/android/reference/com/google/android/gms/common/api/Result) [Releasable](/android/reference/com/google/android/gms/common/api/Releasable) \n**This interface is deprecated.** \n\nUse [DataClient.GetFdForAssetResponse](/android/reference/com/google/android/gms/wearable/DataClient.GetFdForAssetResponse).\n\nContains a file descriptor for the requested asset.\n\nThis object should be [released](/android/reference/com/google/android/gms/common/api/Releasable#release())\nafter use. \n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [ParcelFileDescriptor](//developer.android.com/reference/android/os/ParcelFileDescriptor.html) | [getFd](/android/reference/com/google/android/gms/wearable/DataApi.GetFdForAssetResult#getFd())() Returns a file descriptor for the requested asset. |\n| abstract [InputStream](//developer.android.com/reference/java/io/InputStream.html) | [getInputStream](/android/reference/com/google/android/gms/wearable/DataApi.GetFdForAssetResult#getInputStream())() Returns an input stream wrapping the file descriptor. |\n\n### Inherited Method Summary\n\nFrom interface com.google.android.gms.common.api.Result \n\n|--------------------------------------------------------------------------------|-------------|\n| abstract [Status](/android/reference/com/google/android/gms/common/api/Status) | getStatus() |\n\nFrom interface com.google.android.gms.common.api.Releasable \n\n|---------------|-----------|\n| abstract void | release() |\n\nPublic Methods\n--------------\n\n#### public abstract [ParcelFileDescriptor](//developer.android.com/reference/android/os/ParcelFileDescriptor.html)\n**getFd** ()\n\nReturns a file descriptor for the requested asset. \n\n#### public abstract [InputStream](//developer.android.com/reference/java/io/InputStream.html)\n**getInputStream** ()\n\nReturns an input stream wrapping the file descriptor. When this input stream is\nclosed, the file descriptor is, as well."]]