26 package javax.sound.midi; 27 28 import java.util.Collections; 29 import java.util.HashMap; 30 import java.util.Map; 31 32 /** 33 * A {@code MidiFileFormat} object encapsulates a MIDI file's type, as well as 34 * its length and timing information. 35 * <p> 36 * A {@code MidiFileFormat} object can include a set of properties. A property 37 * is a pair of key and value: the key is of type {@code String}, the associated 38 * property value is an arbitrary object. Properties specify additional 39 * informational meta data (like a author, or copyright). Properties are 40 * optional information, and file reader and file writer implementations are not 41 * required to provide or recognize properties. 42 * <p> 43 * The following table lists some common properties that should be used in 44 * implementations: 45 * 46 * <table border=1> 47 * <caption>MIDI File Format Properties</caption> 48 * <tr> 49 * <th>Property key 50 * <th>Value type 51 * <th>Description 52 * <tr> 53 * <td>"author" 54 * <td>{@link String String} 55 * <td>name of the author of this file 56 * <tr> 57 * <td>"title" 58 * <td>{@link String String} 59 * <td>title of this file 60 * <tr> 61 * <td>"copyright" 62 * <td>{@link String String} 63 * <td>copyright message 64 * <tr> 65 * <td>"date" 66 * <td>{@link java.util.Date Date} 67 * <td>date of the recording or release 68 * <tr> 69 * <td>"comment" 70 * <td>{@link String String} 71 * <td>an arbitrary text 72 * </table> 73 * 74 * @author Kara Kytle 75 * @author Florian Bomers 76 * @see MidiSystem#getMidiFileFormat(java.io.File) 77 * @see Sequencer#setSequence(java.io.InputStream stream) 78 */ 79 public class MidiFileFormat { 80 81 /** 82 * Represents unknown length. 83 * 84 * @see #getByteLength 85 * @see #getMicrosecondLength 86 */ 87 public static final int UNKNOWN_LENGTH = -1; 88 89 /** 90 * The type of MIDI file. 91 */ | 26 package javax.sound.midi; 27 28 import java.util.Collections; 29 import java.util.HashMap; 30 import java.util.Map; 31 32 /** 33 * A {@code MidiFileFormat} object encapsulates a MIDI file's type, as well as 34 * its length and timing information. 35 * <p> 36 * A {@code MidiFileFormat} object can include a set of properties. A property 37 * is a pair of key and value: the key is of type {@code String}, the associated 38 * property value is an arbitrary object. Properties specify additional 39 * informational meta data (like a author, or copyright). Properties are 40 * optional information, and file reader and file writer implementations are not 41 * required to provide or recognize properties. 42 * <p> 43 * The following table lists some common properties that should be used in 44 * implementations: 45 * 46 * <table class="striped"> 47 * <caption>MIDI File Format Properties</caption> 48 * <thead> 49 * <tr> 50 * <th scope="col">Property key 51 * <th scope="col">Value type 52 * <th scope="col">Description 53 * </thead> 54 * <tbody> 55 * <tr> 56 * <th scope="row">"author" 57 * <td>{@link String String} 58 * <td>name of the author of this file 59 * <tr> 60 * <th scope="row">"title" 61 * <td>{@link String String} 62 * <td>title of this file 63 * <tr> 64 * <th scope="row">"copyright" 65 * <td>{@link String String} 66 * <td>copyright message 67 * <tr> 68 * <th scope="row">"date" 69 * <td>{@link java.util.Date Date} 70 * <td>date of the recording or release 71 * <tr> 72 * <th scope="row">"comment" 73 * <td>{@link String String} 74 * <td>an arbitrary text 75 * </tbody> 76 * </table> 77 * 78 * @author Kara Kytle 79 * @author Florian Bomers 80 * @see MidiSystem#getMidiFileFormat(java.io.File) 81 * @see Sequencer#setSequence(java.io.InputStream stream) 82 */ 83 public class MidiFileFormat { 84 85 /** 86 * Represents unknown length. 87 * 88 * @see #getByteLength 89 * @see #getMicrosecondLength 90 */ 91 public static final int UNKNOWN_LENGTH = -1; 92 93 /** 94 * The type of MIDI file. 95 */ |