/* */
/* */ public void add(long paramLong, MIDIData paramMIDIData)
/* */ throws CAException
/* */ {
/* 134 */ if (this.readOnly) {
/* 135 */ throw new CAException("read only");
/* */ }
/* 137 */ if (this.curPacket == 0) {
/* 138 */ init();
/* */ }
/* 140 */ if (paramMIDIData.getMIDIDataLength() > 65536)
/* 141 */ throw new CAException("Can't add MIDIData with greater size than 65536");
/* 142 */ int i = MIDIPacketListAdd(_ID(), getSize(), this.curPacket, paramLong, paramMIDIData.getMIDIDataLength(), CAObject.ID(paramMIDIData) + paramMIDIData.getMIDIDataOffset());
/* */
/* 148 */ if (i == 0) {
/* 149 */ throw new CAException("out of bounds");
/* */ }
/* 151 */ this.curPacket = i;
/* 152 */ int j = numPackets();
/* 153 */ if (j > this.cachedMIDIPacketArray.length)
/* 154 */ resetPacketArray(j);