question: @ Override @ SuppressWarnings ( "unchecked" ) public void completed ( int bytesTransferred , boolean canInvokeDirect ) { if ( bytesTransferred == 0 ) { bytesTransferred = - 1 ; } else { updateBuffers ( bytesTransferred ) ; } releaseBuffers ( ) ; synchronized ( result ) { if ( result . isDone ( ) ) return ; enableReading ( ) ; if ( scatteringRead ) { result . setResult ( ( V ) Long . valueOf ( bytesTransferred ) ) ; } else { result . setResult ( ( V ) Integer . valueOf ( bytesTransferred ) ) ; } } if ( canInvokeDirect ) { Invoker . invokeUnchecked ( result ) ; } else { Invoker . invoke ( result ) ; } }
target:  Executed when the I/O has completed