public void logMidiMessage(byte[] data,int offset,int count){
  String text="Received: ";
  for (int i=0; i < count; i++) {
    text+=String.format("0x%02X, ",data[offset + i]);
  }
  Log.i(TAG,text);
}

public void logMidiMessage ( byte [ ] data , int offset , int count ) { String text = "Received: " ; for ( int i = 0 ; i < count ; i ++ ) { text += String . format ( "0x%02X, " , data [ offset + i ] ) ; } Log . i ( TAG , text ) ; }
assume message has been aligned to the start of a midi message .
