public class

DataFetchProducer

extends LocalFetchProducer
java.lang.Object
   ↳ com.facebook.imagepipeline.producers.LocalFetchProducer
     ↳ com.facebook.imagepipeline.producers.DataFetchProducer

Class Overview

Producer for data URIs.

Data URIs embed the data in the URI itself. They don't point to a file location; the URI is the data. Data can be encoded in either base-64 or escaped ASCII. See the spec for full details.

Data URIs are intended for small pieces of data only, since the URI lives on the Java heap. For large data, use a another URI type.

Charsets specified in the URI are ignored. Only UTF-8 encoding is currently supported.

Summary

Constants
String PRODUCER_NAME
Public Constructors
DataFetchProducer(PooledByteBufferFactory pooledByteBufferFactory)
Protected Methods
EncodedImage getEncodedImage(ImageRequest imageRequest)
Gets an encoded image from the local resource.
String getProducerName()
[Expand]
Inherited Methods
From class com.facebook.imagepipeline.producers.LocalFetchProducer
From class java.lang.Object
From interface com.facebook.imagepipeline.producers.Producer

Constants

public static final String PRODUCER_NAME

Constant Value: "DataFetchProducer"

Public Constructors

public DataFetchProducer (PooledByteBufferFactory pooledByteBufferFactory)

Protected Methods

protected 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 String getProducerName ()

Returns
  • name of the Producer