FileDocCategorySizeDatePackage
Movie.javaAPI DocAndroid 5.1 API2971Thu Mar 12 22:22:30 GMT 2015android.graphics

Movie

public class Movie extends Object

Fields Summary
private final long
mNativeMovie
Constructors Summary
private Movie(long nativeMovie)

        if (nativeMovie == 0) {
            throw new RuntimeException("native movie creation failed");
        }
        mNativeMovie = nativeMovie;
    
Methods Summary
public static native android.graphics.MoviedecodeByteArray(byte[] data, int offset, int length)

public static android.graphics.MoviedecodeFile(java.lang.String pathName)

        InputStream is;
        try {
            is = new FileInputStream(pathName);
        }
        catch (java.io.FileNotFoundException e) {
            return null;
        }
        return decodeTempStream(is);
    
public static android.graphics.MoviedecodeStream(java.io.InputStream is)

        if (is == null) {
            return null;
        }
        if (is instanceof AssetManager.AssetInputStream) {
            final long asset = ((AssetManager.AssetInputStream) is).getNativeAsset();
            return nativeDecodeAsset(asset);
        }

        return nativeDecodeStream(is);
    
private static android.graphics.MoviedecodeTempStream(java.io.InputStream is)

        Movie moov = null;
        try {
            moov = decodeStream(is);
            is.close();
        }
        catch (java.io.IOException e) {
            /*  do nothing.
                If the exception happened on open, moov will be null.
                If it happened on close, moov is still valid.
            */
        }
        return moov;
    
public native voiddraw(Canvas canvas, float x, float y, Paint paint)

public voiddraw(Canvas canvas, float x, float y)

        draw(canvas, x, y, null);
    
public native intduration()

protected voidfinalize()

        try {
            nativeDestructor(mNativeMovie);
        } finally {
            super.finalize();
        }
    
public native intheight()

public native booleanisOpaque()

private static native android.graphics.MovienativeDecodeAsset(long asset)

private static native android.graphics.MovienativeDecodeStream(java.io.InputStream is)

private static native voidnativeDestructor(long nativeMovie)

public native booleansetTime(int relativeMilliseconds)

public native intwidth()