@ Nullable // TODO make non-null and always throw? public Bitmap get ( ) throws IOException { long started = System . nanoTime ( ) ; checkNotMain ( ) ; if ( deferred ) { throw new IllegalStateException ( "Fit cannot be used with get." ) ; } if ( ! data . hasImage ( ) ) { return null ; } Request request = createRequest ( started ) ; Action action = new GetAction ( picasso , request ) ; RequestHandler . Result result = forRequest ( picasso , picasso . dispatcher , picasso . cache , picasso . stats , action ) . hunt ( ) ; Bitmap bitmap = result . getBitmap ( ) ; if ( bitmap != null && shouldWriteToMemoryCache ( request . memoryPolicy ) ) { picasso . cache . set ( request . key , bitmap ) ; } return bitmap ; }
Synchronously fulfill this request . Must not be called from the main thread .