final class com.sun.media.sound.SMFParser
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.sun.media.sound.SMFParser
super_class: java.lang.Object
{
private static final int MTrk_MAGIC;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1297379947
private static final boolean STRICT_PARSER;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final boolean DEBUG;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
int tracks;
descriptor: I
flags: (0x0000)
java.io.DataInputStream stream;
descriptor: Ljava/io/DataInputStream;
flags: (0x0000)
private int trackLength;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private byte[] trackData;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int pos;
descriptor: I
flags: (0x0002) ACC_PRIVATE
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield com.sun.media.sound.SMFParser.trackLength:I
2: aload 0
aconst_null
putfield com.sun.media.sound.SMFParser.trackData:[B
3: aload 0
iconst_0
putfield com.sun.media.sound.SMFParser.pos:I
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/sun/media/sound/SMFParser;
private int readUnsigned();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.media.sound.SMFParser.trackData:[B
aload 0
dup
getfield com.sun.media.sound.SMFParser.pos:I
dup_x1
iconst_1
iadd
putfield com.sun.media.sound.SMFParser.pos:I
baload
sipush 255
iand
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/media/sound/SMFParser;
Exceptions:
throws java.io.IOException
private void read(byte[]);
descriptor: ([B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.sun.media.sound.SMFParser.trackData:[B
aload 0
getfield com.sun.media.sound.SMFParser.pos:I
aload 1
iconst_0
aload 1
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
1: aload 0
dup
getfield com.sun.media.sound.SMFParser.pos:I
aload 1
arraylength
iadd
putfield com.sun.media.sound.SMFParser.pos:I
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/sun/media/sound/SMFParser;
0 3 1 data [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
data
private long readVarInt();
descriptor: ()J
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=1
start local 0 0: lconst_0
lstore 1
start local 1 1: iconst_0
istore 3
start local 3 2: StackMap locals: long int
StackMap stack:
aload 0
getfield com.sun.media.sound.SMFParser.trackData:[B
aload 0
dup
getfield com.sun.media.sound.SMFParser.pos:I
dup_x1
iconst_1
iadd
putfield com.sun.media.sound.SMFParser.pos:I
baload
sipush 255
iand
istore 3
3: lload 1
bipush 7
lshl
iload 3
bipush 127
iand
i2l
ladd
lstore 1
4: iload 3
sipush 128
iand
ifne 2
5: lload 1
lreturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/media/sound/SMFParser;
1 6 1 value J
2 6 3 currentByte I
Exceptions:
throws java.io.IOException
private int readIntFromStream();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.media.sound.SMFParser.stream:Ljava/io/DataInputStream;
invokevirtual java.io.DataInputStream.readInt:()I
1: ireturn
2: StackMap locals:
StackMap stack: java.io.EOFException
pop
3: new java.io.EOFException
dup
ldc "invalid MIDI file"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/media/sound/SMFParser;
Exception table:
from to target type
0 1 2 Class java.io.EOFException
Exceptions:
throws java.io.IOException
boolean nextTrack();
descriptor: ()Z
flags: (0x0000)
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
iconst_0
putfield com.sun.media.sound.SMFParser.trackLength:I
1: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.media.sound.SMFParser.stream:Ljava/io/DataInputStream;
aload 0
getfield com.sun.media.sound.SMFParser.trackLength:I
invokevirtual java.io.DataInputStream.skipBytes:(I)I
aload 0
getfield com.sun.media.sound.SMFParser.trackLength:I
if_icmpeq 4
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
new java.io.EOFException
dup
ldc "invalid MIDI file"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.media.sound.SMFParser.readIntFromStream:()I
istore 1
start local 1 5: aload 0
aload 0
invokevirtual com.sun.media.sound.SMFParser.readIntFromStream:()I
putfield com.sun.media.sound.SMFParser.trackLength:I
6: iload 1
ldc 1297379947
if_icmpne 1
7: aload 0
getfield com.sun.media.sound.SMFParser.trackLength:I
ifge 9
8: iconst_0
ireturn
9: StackMap locals: int
StackMap stack:
aload 0
aload 0
getfield com.sun.media.sound.SMFParser.trackLength:I
newarray 8
putfield com.sun.media.sound.SMFParser.trackData:[B
10: aload 0
getfield com.sun.media.sound.SMFParser.stream:Ljava/io/DataInputStream;
aload 0
getfield com.sun.media.sound.SMFParser.trackData:[B
invokevirtual java.io.DataInputStream.readFully:([B)V
11: goto 15
StackMap locals:
StackMap stack: java.io.EOFException
12: pop
13: iconst_0
ireturn
14: StackMap locals:
StackMap stack:
new java.io.EOFException
dup
ldc "invalid MIDI file"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield com.sun.media.sound.SMFParser.pos:I
16: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/sun/media/sound/SMFParser;
5 17 1 magic I
Exception table:
from to target type
10 11 12 Class java.io.EOFException
Exceptions:
throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
private boolean trackFinished();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.media.sound.SMFParser.pos:I
aload 0
getfield com.sun.media.sound.SMFParser.trackLength:I
if_icmplt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/media/sound/SMFParser;
void readTrack(javax.sound.midi.Track);
descriptor: (Ljavax/sound/midi/Track;)V
flags: (0x0000)
Code:
stack=6, locals=17, args_size=2
start local 0 start local 1 0: lconst_0
lstore 2
start local 2 1: iconst_0
istore 4
start local 4 2: iconst_0
istore 5
start local 5 3: goto 43
4: StackMap locals: long int int
StackMap stack:
iconst_m1
istore 7
start local 7 5: iconst_0
istore 8
start local 8 6: lload 2
aload 0
invokevirtual com.sun.media.sound.SMFParser.readVarInt:()J
ladd
lstore 2
7: aload 0
invokevirtual com.sun.media.sound.SMFParser.readUnsigned:()I
istore 9
start local 9 8: iload 9
sipush 128
if_icmplt 11
9: iload 9
istore 4
10: goto 12
11: StackMap locals: com.sun.media.sound.SMFParser javax.sound.midi.Track long int int top int int int
StackMap stack:
iload 9
istore 7
12: StackMap locals:
StackMap stack:
iload 4
sipush 240
iand
lookupswitch { // 8
128: 13
144: 13
160: 13
176: 13
192: 18
208: 18
224: 13
240: 22
default: 41
}
13: StackMap locals:
StackMap stack:
iload 7
iconst_m1
if_icmpne 15
14: aload 0
invokevirtual com.sun.media.sound.SMFParser.readUnsigned:()I
istore 7
15: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.media.sound.SMFParser.readUnsigned:()I
istore 8
16: new com.sun.media.sound.FastShortMessage
dup
iload 4
iload 7
bipush 8
ishl
ior
iload 8
bipush 16
ishl
ior
invokespecial com.sun.media.sound.FastShortMessage.<init>:(I)V
astore 6
start local 6 17: goto 42
end local 6 18: StackMap locals:
StackMap stack:
iload 7
iconst_m1
if_icmpne 20
19: aload 0
invokevirtual com.sun.media.sound.SMFParser.readUnsigned:()I
istore 7
20: StackMap locals:
StackMap stack:
new com.sun.media.sound.FastShortMessage
dup
iload 4
iload 7
bipush 8
ishl
ior
invokespecial com.sun.media.sound.FastShortMessage.<init>:(I)V
astore 6
start local 6 21: goto 42
end local 6 22: StackMap locals:
StackMap stack:
iload 4
lookupswitch { // 3
240: 23
247: 23
255: 30
default: 40
}
23: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.media.sound.SMFParser.readVarInt:()J
l2i
istore 10
start local 10 24: iload 10
newarray 8
astore 11
start local 11 25: aload 0
aload 11
invokevirtual com.sun.media.sound.SMFParser.read:([B)V
26: new javax.sound.midi.SysexMessage
dup
invokespecial javax.sound.midi.SysexMessage.<init>:()V
astore 12
start local 12 27: aload 12
iload 4
aload 11
iload 10
invokevirtual javax.sound.midi.SysexMessage.setMessage:(I[BI)V
28: aload 12
astore 6
start local 6 29: goto 42
end local 12 end local 11 end local 10 end local 6 30: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.media.sound.SMFParser.readUnsigned:()I
istore 13
start local 13 31: aload 0
invokevirtual com.sun.media.sound.SMFParser.readVarInt:()J
l2i
istore 14
start local 14 32: iload 14
newarray 8
astore 15
start local 15 33: aload 0
aload 15
invokevirtual com.sun.media.sound.SMFParser.read:([B)V
34: new javax.sound.midi.MetaMessage
dup
invokespecial javax.sound.midi.MetaMessage.<init>:()V
astore 16
start local 16 35: aload 16
iload 13
aload 15
iload 14
invokevirtual javax.sound.midi.MetaMessage.setMessage:(I[BI)V
36: aload 16
astore 6
start local 6 37: iload 13
bipush 47
if_icmpne 42
38: iconst_1
istore 5
39: goto 42
end local 16 end local 15 end local 14 end local 13 end local 6 40: StackMap locals:
StackMap stack:
new javax.sound.midi.InvalidMidiDataException
dup
new java.lang.StringBuilder
dup
ldc "Invalid status byte: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial javax.sound.midi.InvalidMidiDataException.<init>:(Ljava/lang/String;)V
athrow
41: StackMap locals:
StackMap stack:
new javax.sound.midi.InvalidMidiDataException
dup
new java.lang.StringBuilder
dup
ldc "Invalid status byte: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial javax.sound.midi.InvalidMidiDataException.<init>:(Ljava/lang/String;)V
athrow
start local 6 42: StackMap locals: com.sun.media.sound.SMFParser javax.sound.midi.Track long int int javax.sound.midi.MidiMessage int int int
StackMap stack:
aload 1
new javax.sound.midi.MidiEvent
dup
aload 6
lload 2
invokespecial javax.sound.midi.MidiEvent.<init>:(Ljavax/sound/midi/MidiMessage;J)V
invokevirtual javax.sound.midi.Track.add:(Ljavax/sound/midi/MidiEvent;)Z
pop
end local 9 end local 8 end local 7 end local 6 43: StackMap locals: com.sun.media.sound.SMFParser javax.sound.midi.Track long int int
StackMap stack:
aload 0
invokevirtual com.sun.media.sound.SMFParser.trackFinished:()Z
ifne 47
iload 5
ifeq 4
end local 5 end local 4 end local 2 44: goto 47
StackMap locals: com.sun.media.sound.SMFParser javax.sound.midi.Track
StackMap stack: java.lang.ArrayIndexOutOfBoundsException
45: astore 2
start local 2 46: new java.io.EOFException
dup
ldc "invalid MIDI file"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
end local 2 47: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 48 0 this Lcom/sun/media/sound/SMFParser;
0 48 1 track Ljavax/sound/midi/Track;
1 44 2 tick J
2 44 4 status I
3 44 5 endOfTrackFound Z
17 18 6 message Ljavax/sound/midi/MidiMessage;
21 22 6 message Ljavax/sound/midi/MidiMessage;
29 30 6 message Ljavax/sound/midi/MidiMessage;
37 40 6 message Ljavax/sound/midi/MidiMessage;
42 43 6 message Ljavax/sound/midi/MidiMessage;
5 43 7 data1 I
6 43 8 data2 I
8 43 9 byteValue I
24 30 10 sysexLength I
25 30 11 sysexData [B
27 30 12 sysexMessage Ljavax/sound/midi/SysexMessage;
31 40 13 metaType I
32 40 14 metaLength I
33 40 15 metaData [B
35 40 16 metaMessage Ljavax/sound/midi/MetaMessage;
46 47 2 e Ljava/lang/ArrayIndexOutOfBoundsException;
Exception table:
from to target type
0 44 45 Class java.lang.ArrayIndexOutOfBoundsException
Exceptions:
throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
MethodParameters:
Name Flags
track
}
SourceFile: "StandardMidiFileReader.java"