@ Override public void push ( final Buffer buffer ) { if ( async == null ) { upload . pause ( ) ; vertx . fileSystem ( ) . open ( file . getAbsolutePath ( ) , new OpenOptions ( ) . setCreate ( true ) , new Handler < AsyncResult < AsyncFile > > ( ) { @ Override public void handle ( AsyncResult < AsyncFile > event ) { async = event . result ( ) ; async . exceptionHandler ( new Handler < Throwable > ( ) { @ Override public void handle ( Throwable event ) { LoggerFactory . getLogger ( this . getClass ( ) . getName ( ) ) . error ( "Cannot write into {}" , file . getAbsolutePath ( ) , event ) ; } } ) ; async . write ( buffer ) ; Pump . pump ( upload , async ) . start ( ) ; upload . resume ( ) ; } } ) ; } }
A new chunk has arrived save it on disk .