01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.cocoon.components.midi.xmidi;
19:
20: /**
21: * The MIDI file parsing parts of this class are based on code from the XMidi project, written
22: * by Peter Arthur Loeb (http://www.palserv.com/XMidi/) and used with permission.
23: * The warranty disclaimer of the MIT license (http://www.opensource.org/licenses/mit-license.html)
24: * applies to Peter Arthur Loeb's code.
25: *
26: * @author <a href="mailto:mark.leicester@energyintellect.com">Mark Leicester</a>
27: * @author <a href="mailto:peter@palserv.com">Peter Loeb</a>
28: */
29:
30: public class ByteLen {
31: /**
32: * Default constructor.
33: * As of Jan 8, 2001, this is not used.
34: */
35: public ByteLen() {
36: }
37:
38: /**
39: * Constructor used in the
40: * {@link org.apache.cocoon.components.midi.xmidi.Utils#deltaToInt(byte[],int) MX.deltaToInt}
41: * method to create this class, which it then returns.
42: * @param b a byte array; used to set {@link #ba}
43: * @param l a length; used to set {@link #len}
44: */
45: public ByteLen(byte[] b, int l) {
46: ba = b;
47: len = l;
48: }
49:
50: /**
51: * A byte array.
52: */
53: public byte[] ba;
54:
55: /**
56: * As used in the
57: * {@link org.apache.cocoon.components.midi.xmidi.Utils#deltaToInt(byte[],int) MX.deltaToInt}
58: * method, it is the length of the delta field being converted,
59: * not the length of the array.
60: * <p>
61: * There is nothing about this class that requires that this variable
62: * be used in this way. It could be any int.
63: */
64: public int len;
65: }
|