KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > midi > xmidi > ByteLen


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.cocoon.components.midi.xmidi;
18
19 /**
20  * The MIDI file parsing parts of this class are based on code from the XMidi project, written
21  * by Peter Arthur Loeb (http://www.palserv.com/XMidi/) and used with permission.
22  * The warranty disclaimer of the MIT license (http://www.opensource.org/licenses/mit-license.html)
23  * applies to Peter Arthur Loeb's code.
24  *
25  * @author <a HREF="mailto:mark.leicester@energyintellect.com">Mark Leicester</a>
26  * @author <a HREF="mailto:peter@palserv.com">Peter Loeb</a>
27  */

28
29 public class ByteLen {
30     /**
31      * Default constructor.
32      * As of Jan 8, 2001, this is not used.
33      */

34     public ByteLen() {
35     }
36
37     /**
38      * Constructor used in the
39      * {@link org.apache.cocoon.components.midi.xmidi.Utils#deltaToInt(byte[],int) MX.deltaToInt}
40      * method to create this class, which it then returns.
41      * @param b a byte array; used to set {@link #ba}
42      * @param l a length; used to set {@link #len}
43      */

44     public ByteLen(byte[] b, int l) {
45         ba = b;
46         len = l;
47     }
48
49     /**
50      * A byte array.
51      */

52     public byte[] ba;
53
54     /**
55      * As used in the
56      * {@link org.apache.cocoon.components.midi.xmidi.Utils#deltaToInt(byte[],int) MX.deltaToInt}
57      * method, it is the length of the delta field being converted,
58      * not the length of the array.
59      * <p>
60      * There is nothing about this class that requires that this variable
61      * be used in this way. It could be any int.
62      */

63     public int len;
64 }
65
Popular Tags