Class FileDescriptorAssetPathFetcher

  • All Implemented Interfaces:
    DataFetcher<ParcelFileDescriptor>


    public class FileDescriptorAssetPathFetcher
    extends AssetPathFetcher<ParcelFileDescriptor>
    Fetches an android.os.ParcelFileDescriptor for an asset path.
    • Constructor Detail

      • FileDescriptorAssetPathFetcher

        public FileDescriptorAssetPathFetcher(AssetManager assetManager,
                                              String assetPath)
    • Method Detail

      • loadResource

        protected ParcelFileDescriptor loadResource(AssetManager assetManager,
                                                    String path)
                                             throws IOException
        Description copied from class: AssetPathFetcher
        Opens the given asset path with the given android.content.res.AssetManager and returns the conrete data type returned by the AssetManager.
        Specified by:
        loadResource in class  AssetPathFetcher<ParcelFileDescriptor>
        Parameters:
        assetManager - An AssetManager to use to open the given path.
        path - A string path pointing to a resource in assets to open.
        Throws:
        IOException
      • close

        protected void close(ParcelFileDescriptor data)
                      throws IOException
        Description copied from class: AssetPathFetcher
        Closes the concrete data type if necessary.
        Specified by:
        close in class  AssetPathFetcher<ParcelFileDescriptor>
        Parameters:
        data - The data to close.
        Throws:
        IOException -