Code example for BufferedInputStream

Methods: decodeStreamclose

0
 
				    BitmapFactory.decodeFile( image.getAbsolutePath(), options );
				    options.inSampleSize = getScale( options.outWidth, options.outHeight, (int) ( (float) options.outWidth * .70), (int) ( (float) options.outHeight * .70 ) );
				    options.inJustDecodeBounds=false;
				     
					InputStream is = new BufferedInputStream( new FileInputStream( image ) );
					Bitmap bitmap = BitmapFactory.decodeStream( is, null, options );
					is.close();
					 
					return new BitmapDrawable( mResources, bitmap );
				} catch( Exception e ) {
					Log.e( TAG, "create : error reading file", e );
				} 
			} 
		} 
		 
		Log.v( TAG, "create : exit" );
		return super.create( key );
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE