public class

GingerbreadPurgeableDecoder

extends DalvikPurgeableDecoder
java.lang.Object
   ↳ com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
     ↳ com.facebook.imagepipeline.platform.GingerbreadPurgeableDecoder

Class Overview

Bitmap decoder (Gingerbread to Jelly Bean).

This copies incoming encoded bytes into a MemoryFile, and then decodes them using a file descriptor, thus avoiding using any Java memory at all. This technique only works in JellyBean and below.

Summary

[Expand]
Inherited Fields
From class com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
Public Constructors
GingerbreadPurgeableDecoder()
Protected Methods
Bitmap decodeByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> bytesRef, BitmapFactory.Options options)
Decodes a byteArray into a purgeable bitmap
Bitmap decodeJPEGByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options)
Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap

Adds a JFIF End-Of-Image marker if needed before decoding.

[Expand]
Inherited Methods
From class com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
From class java.lang.Object
From interface com.facebook.imagepipeline.platform.PlatformDecoder

Public Constructors

public GingerbreadPurgeableDecoder ()

Protected Methods

protected Bitmap decodeByteArrayAsPurgeable (CloseableReference<PooledByteBuffer> bytesRef, BitmapFactory.Options options)

Decodes a byteArray into a purgeable bitmap

Parameters
bytesRef the byte buffer that contains the encoded bytes
options the options passed to the BitmapFactory
Returns
  • the decoded bitmap

protected Bitmap decodeJPEGByteArrayAsPurgeable (CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options)

Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap

Adds a JFIF End-Of-Image marker if needed before decoding.

Parameters
bytesRef the byte buffer that contains the encoded bytes
length the length of bytes for decox
options the options passed to the BitmapFactory
Returns
  • the decoded bitmap