< prev index next >
src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java
Print this page
*** 177,186 ****
--- 177,187 ----
*
* @param data the system exclusive message data
* @param length the length of the valid message data in the array,
* including the status byte
*/
+ @Override
public void setMessage(byte[] data, int length) throws InvalidMidiDataException {
int status = (data[0] & 0xFF);
if ((status != 0xF0) && (status != 0xF7)) {
throw new InvalidMidiDataException("Invalid status byte for sysex message: 0x" + Integer.toHexString(status));
}
*** 231,240 ****
--- 232,242 ----
* Creates a new object of the same class and with the same contents as this
* object.
*
* @return a clone of this instance
*/
+ @Override
public Object clone() {
byte[] newData = new byte[length];
System.arraycopy(data, 0, newData, 0, newData.length);
SysexMessage event = new SysexMessage(newData);
return event;
< prev index next >