public abstract class

LocalFetchProducer

extends Object
implements Producer<T>
java.lang.Object
   ↳ com.facebook.imagepipeline.producers.LocalFetchProducer
Known Direct Subclasses

Class Overview

Represents a local fetch producer.

Summary

Protected Constructors
LocalFetchProducer(Executor executor, PooledByteBufferFactory pooledByteBufferFactory)
Public Methods
void produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext)
Protected Methods
EncodedImage getByteBufferBackedEncodedImage(InputStream inputStream, int length)
Creates a memory-backed encoded image from the stream.
abstract EncodedImage getEncodedImage(ImageRequest imageRequest)
Gets an encoded image from the local resource.
EncodedImage getEncodedImage(InputStream inputStream, int length)
abstract String getProducerName()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.imagepipeline.producers.Producer

Protected Constructors

protected LocalFetchProducer (Executor executor, PooledByteBufferFactory pooledByteBufferFactory)

Public Methods

public void produceResults (Consumer<EncodedImage> consumer, ProducerContext producerContext)

Protected Methods

protected EncodedImage getByteBufferBackedEncodedImage (InputStream inputStream, int length)

Creates a memory-backed encoded image from the stream. The stream is closed.

Throws
IOException

protected abstract EncodedImage getEncodedImage (ImageRequest imageRequest)

Gets an encoded image from the local resource. It can be either backed by a FileInputStream or a PooledByteBuffer

Parameters
imageRequest request that includes the local resource that is being accessed
Throws
IOException

protected EncodedImage getEncodedImage (InputStream inputStream, int length)

Throws
IOException

protected abstract String getProducerName ()

Returns
  • name of the Producer