Android Open Source - GifImageView Gif Data Downloader






From Project

Back to project page GifImageView.

License

The source code is released under:

MIT License

If you think the Android project GifImageView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.felipecsl.gifimageview.app;
/* w ww. j a v a 2 s .c  o  m*/
import android.os.AsyncTask;
import android.util.Log;

public class GifDataDownloader extends AsyncTask<String, Void, byte[]> {

    private static final String TAG = "GifDataDownloader";

    public GifDataDownloader() {
    }

    @Override
    protected byte[] doInBackground(final String... params) {
        final String gifUrl = params[0];

        if (gifUrl == null)
            return null;

        byte[] gif = null;
        try {
            gif = ByteArrayHttpClient.get(gifUrl);
        } catch (OutOfMemoryError e) {
            Log.e(TAG, "GifDecode OOM: " + gifUrl, e);
        }

        return gif;
    }
}




Java Source Code List

com.felipecsl.gifimageview.app.ByteArrayHttpClient.java
com.felipecsl.gifimageview.app.GifDataDownloader.java
com.felipecsl.gifimageview.app.MainActivity.java
com.felipecsl.gifimageview.library.GifDecoder.java
com.felipecsl.gifimageview.library.GifImageView.java