Class FileDescriptorAssetPathFetcher

  • All Implemented Interfaces:
    DataFetcher<android.content.res.AssetFileDescriptor>

    public class FileDescriptorAssetPathFetcher
    extends AssetPathFetcher<android.content.res.AssetFileDescriptor>
    Fetches an AssetFileDescriptor for an asset path.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDescriptorAssetPathFetcher​(android.content.res.AssetManager assetManager, java.lang.String assetPath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void close​(android.content.res.AssetFileDescriptor data)
      Closes the concrete data type if necessary.
      java.lang.Class<android.content.res.AssetFileDescriptor> getDataClass()
      Returns the class of the data this fetcher will attempt to obtain.
      protected android.content.res.AssetFileDescriptor loadResource​(android.content.res.AssetManager assetManager, java.lang.String path)
      Opens the given asset path with the given AssetManager and returns the concrete data type returned by the AssetManager.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileDescriptorAssetPathFetcher

        public FileDescriptorAssetPathFetcher​(android.content.res.AssetManager assetManager,
                                              java.lang.String assetPath)
    • Method Detail

      • loadResource

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

        protected void close​(android.content.res.AssetFileDescriptor data)
                      throws java.io.IOException
        Description copied from class: AssetPathFetcher
        Closes the concrete data type if necessary.
        Specified by:
        close in class AssetPathFetcher<android.content.res.AssetFileDescriptor>
        Parameters:
        data - The data to close.
        Throws:
        java.io.IOException
      • getDataClass

        @NonNull
        public java.lang.Class<android.content.res.AssetFileDescriptor> getDataClass()
        Description copied from interface: DataFetcher
        Returns the class of the data this fetcher will attempt to obtain.