javax.sound.midi

Class MetaMessage

public class MetaMessage extends MidiMessage

A system exclusive MIDI message.

Since: 1.3

Field Summary
static intMETA
The META status code.
Constructor Summary
MetaMessage()
Create a default valid meta message.
protected MetaMessage(byte[] data)
Create a MetaMessage object.
Method Summary
Objectclone()
byte[]getData()
Get the data for this message, not including the status, type, or length information.
intgetType()
Get the meta message type.
voidsetMessage(int type, byte[] data, int length)
Set the meta message.

Field Detail

META

public static final int META
The META status code. Only valid for MIDI files, not the wire protocol.

Constructor Detail

MetaMessage

public MetaMessage()
Create a default valid meta message. The official specs don't specify what message is to be created. For now, we create a zero length meta message with a type code of 0.

MetaMessage

protected MetaMessage(byte[] data)
Create a MetaMessage object.

Parameters: data a complete system exclusive message

Method Detail

clone

public Object clone()

getData

public byte[] getData()
Get the data for this message, not including the status, type, or length information.

Returns: the message data, not including status, type or lenght info

getType

public int getType()
Get the meta message type.

Returns: the meta message type

setMessage

public void setMessage(int type, byte[] data, int length)
Set the meta message.

Parameters: type the meta type byte (< 128) data the message data length the length of the message data

Throws: InvalidMidiDataException if this message is invalid