#NEWLINE# def _run_read_callback( self , size , streaming ) : #NEWLINE# #INDENT# if streaming : #NEWLINE# #INDENT# callback = self . _streaming_callback #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# callback = self . _read_callback #NEWLINE# self . _read_callback = self . _streaming_callback = None #NEWLINE# #UNINDENT# if ( self . _read_future is not None ) : #NEWLINE# #INDENT# assert ( callback is None ) #NEWLINE# future = self . _read_future #NEWLINE# self . _read_future = None #NEWLINE# future . set_result ( self . _consume ( size ) ) #NEWLINE# #UNINDENT# if ( callback is not None ) : #NEWLINE# #INDENT# assert ( self . _read_future is None ) #NEWLINE# self . _run_callback ( callback , self . _consume ( size ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _maybe_add_error_listener ( )