Code example for BufferedInputStream

Methods: decodeStreamclosesleep

0
	@Override 
	public Bitmap run(String path) {
		File f = new File(path);
		BufferedInputStream bis;
		try { 
			bis = new BufferedInputStream(new FileInputStream(f), 8192);
			BitmapFactory.Options o = new BitmapFactory.Options();
			o.inSampleSize = 8;
			Bitmap bm = BitmapFactory.decodeStream(bis, null, o);
			try { 
				Thread.sleep(2000);
			} catch (InterruptedException e1) {
				// TODO Auto-generated catch block 
				e1.printStackTrace();
			} 
			// System.out.println(bm.getHeight()); 
			try { 
				bis.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} 
			 
Stop searching for code, let great code find you!  Add Codota to your java IDE