Package 

Class ImageSources

    • Method Detail

      • create

         final static ImageSource create(Path file, FileSystem fileSystem, String diskCacheKey, Closeable closeable)

        Create a new ImageSource backed by a File.

        Parameters:
        file - The file to read from.
        fileSystem - The file system which contains file.
        diskCacheKey - An optional cache key for the file in the disk cache.
        closeable - An optional closeable reference that will be closed when the image source is closed.
      • create

         final static ImageSource create(Path file, FileSystem fileSystem, String diskCacheKey, Closeable closeable, ImageSource.Metadata metadata)

        Create a new ImageSource backed by a File.

        Parameters:
        file - The file to read from.
        fileSystem - The file system which contains file.
        diskCacheKey - An optional cache key for the file in the disk cache.
        closeable - An optional closeable reference that will be closed when the image source is closed.
        metadata - Metadata for this image source.
      • create

         final static ImageSource create(BufferedSource source, Context context)

        Create a new ImageSource backed by a BufferedSource.

        Parameters:
        source - The buffered source to read from.
        context - A context used to resolve a safe cache directory.
      • create

         final static ImageSource create(BufferedSource source, Context context, ImageSource.Metadata metadata)

        Create a new ImageSource backed by a BufferedSource.

        Parameters:
        source - The buffered source to read from.
        context - A context used to resolve a safe cache directory.
        metadata - Metadata for this image source.
      • create

         final static ImageSource create(BufferedSource source, File cacheDirectory)

        Create a new ImageSource backed by a BufferedSource.

        Parameters:
        source - The buffered source to read from.
        cacheDirectory - The directory to create temporary files in if ImageSource.file is called.
      • create

         final static ImageSource create(BufferedSource source, File cacheDirectory, ImageSource.Metadata metadata)

        Create a new ImageSource backed by a BufferedSource.

        Parameters:
        source - The buffered source to read from.
        cacheDirectory - The directory to create temporary files in if ImageSource.file is called.
        metadata - Metadata for this image source.