push the input data from java to c on each event