List of usage examples for javax.sound.midi SysexMessage getMessage
public byte[] getMessage()
From source file:de.ailis.midi4js.MessageReceiver.java
/** * Processes a sysex message./* w w w.j a v a2 s . c o m*/ * * @param message * The message to process. * @param json * The JSON stringer. * @throws JSONException * When JSON output fails. */ private void processSysexMessage(final SysexMessage message, final JSONStringer json) throws JSONException { json.key("class").value("SysexMessage"); json.key("data"); json.array(); final byte[] data = message.getMessage(); final int max = Math.min(data.length, message.getLength()); for (int i = 0; i < max; i++) json.value(data[i] & 0xff); json.endArray(); }