public RFuture < ByteBuffer > getBytes ( final String path ) { final RPromise < ByteBuffer > result = exec . deferredPromise ( ) ; exec . invokeAsync ( new Runnable ( ) { public void run ( ) { try { result . succeed ( getBytesSync ( path ) ) ; } catch ( Throwable t ) { result . fail ( t ) ; } } } ) ; return result ; }
Loads binary data asynchronously . The returned state instance provides a means to listen for the arrival of the data .