NewPipe-app-android/app/src/main/java/org/schabi/newpipe/ImageDownloader.java

26 lines
742 B
Java
Raw Normal View History

2018-02-22 13:25:56 +01:00
package org.schabi.newpipe;
import android.content.Context;
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
import org.schabi.newpipe.extractor.NewPipe;
import java.io.IOException;
import java.io.InputStream;
public class ImageDownloader extends BaseImageDownloader {
public ImageDownloader(Context context) {
super(context);
}
public ImageDownloader(Context context, int connectTimeout, int readTimeout) {
super(context, connectTimeout, readTimeout);
}
protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException {
Downloader downloader = (Downloader) NewPipe.getDownloader();
return downloader.stream(imageUri);
}
}