FileDocCategorySizeDatePackage
BitmapSerializeUtils.javaAPI DocAndroid 5.1 API1913Thu Mar 12 22:22:42 GMT 2015com.android.printspooler.util

BitmapSerializeUtils

public final class BitmapSerializeUtils extends Object
Helper for serialization of bitmaps in the very specific use case of having the same bitmap on both ends and just marshaling the pixels from one side to the other.

Fields Summary
Constructors Summary
private BitmapSerializeUtils()

        System.loadLibrary("printspooler_jni");
    
        /* do nothing */
    
Methods Summary
private static native voidnativeReadBitmapPixels(android.graphics.Bitmap bitmap, int fd)

private static native voidnativeWriteBitmapPixels(android.graphics.Bitmap bitmap, int fd)

public static voidreadBitmapPixels(android.graphics.Bitmap bitmap, android.os.ParcelFileDescriptor source)
Reads a bitmap pixels from a file descriptor.

param
bitmap A bitmap whose pixels to populate.
param
source The source file descriptor.

        nativeReadBitmapPixels(bitmap, source.getFd());
    
public static voidwriteBitmapPixels(android.graphics.Bitmap bitmap, android.os.ParcelFileDescriptor destination)
Writes a bitmap pixels to a file descriptor.

param
bitmap The bitmap.
param
destination The destination file descriptor.

        nativeWriteBitmapPixels(bitmap, destination.getFd());