@NonNull private static ShortMessage processRunningMessage(final int status,final int data1,@NonNull final DataInput midiDataInputStream) throws InvalidMidiDataException, IOException {
  final ShortMessage shortMessage;
switch (status & ShortMessage.MASK_EVENT) {
case ShortMessage.NOTE_OFF:
case ShortMessage.NOTE_ON:
case ShortMessage.POLY_PRESSURE:
case ShortMessage.CONTROL_CHANGE:
case ShortMessage.PITCH_BEND:
    shortMessage=new ShortMessage();
  shortMessage.setMessage(status,data1,midiDataInputStream.readUnsignedByte());
break;
case ShortMessage.PROGRAM_CHANGE:
case ShortMessage.CHANNEL_PRESSURE:
shortMessage=new ShortMessage();
shortMessage.setMessage(status,data1,0);
break;
default :
throw new InvalidMidiDataException(String.format("Invalid data: %02x %02x",status,data1));
}
return shortMessage;
}

@ NonNull private static ShortMessage processRunningMessage ( final int status , final int data1 , @ NonNull final DataInput midiDataInputStream ) throws InvalidMidiDataException , IOException { final ShortMessage shortMessage ; switch ( status & ShortMessage . MASK_EVENT ) { case ShortMessage . NOTE_OFF : case ShortMessage . NOTE_ON : case ShortMessage . POLY_PRESSURE : case ShortMessage . CONTROL_CHANGE : case ShortMessage . PITCH_BEND : shortMessage = new ShortMessage ( ) ; shortMessage . setMessage ( status , data1 , midiDataInputStream . readUnsignedByte ( ) ) ; break ; case ShortMessage . PROGRAM_CHANGE : case ShortMessage . CHANNEL_PRESSURE : shortMessage = new ShortMessage ( ) ; shortMessage . setMessage ( status , data1 , 0 ) ; break ; default : throw new InvalidMidiDataException ( String . format ( "Invalid data: %02x %02x" , status , data1 ) ) ; } return shortMessage ; }
process the midi running message
