Here you can find the source of toBitmapDrawable(InputStream is)
public static BitmapDrawable toBitmapDrawable(InputStream is) throws IOException
//package com.java2s; import java.io.IOException; import java.io.InputStream; import android.graphics.drawable.BitmapDrawable; public class Main { public static BitmapDrawable toBitmapDrawable(InputStream is) throws IOException { BitmapDrawable bitmapDrawable = new BitmapDrawable(is); is.close();//from w w w .ja v a 2 s. c o m return bitmapDrawable; } }