MidiFileWriter supplies MIDI file-writing services. Classes that
implement this interface can write one or more types of MIDI file from a
Sequence object.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract int[] | Returns: array of file types. If no file types are supported, an array of length 0 is returned.Obtains the set of MIDI file types for which file writing support is provided by this file writer. |
| public abstract int[] | Returns: array of file types. If no file types are supported, returns an array of length 0.the sequence for which MIDI file type support is queried sequence)Obtains the file types that this file writer can write from the sequence specified. |
| public boolean | Returns: true if the file type is supported, otherwise
falsethe file type for which write capabilities are queried fileType)Indicates whether file writing support for the specified MIDI file type is provided by this file writer. |
| public boolean | Returns: true if the file type is supported for this sequence,
otherwise falsethe file type for which write capabilities are queried fileType, final Sequence the sequence for which file writing support is queried sequence)Indicates whether a MIDI file of the file type specified can be written from the sequence indicated. |
| public abstract int | Returns: the number of bytes written to the output streamsequence containing MIDI data to be written to the file in, int type of the file to be written to the output stream fileType, OutputStream stream to which the file data should be written out)Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided. |
| public abstract int | Returns: the number of bytes written to the filesequence containing MIDI data to be written to the external
file in, int type of the file to be written to the external file fileType, File external file to which the file data should be written out)Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided. |
| MidiFileWriter | back to summary |
|---|---|
| protected MidiFileWriter() Constructor for subclasses to call. | |
| getMidiFileTypes | back to summary |
|---|---|
| public abstract int[] getMidiFileTypes() Obtains the set of MIDI file types for which file writing support is provided by this file writer.
| |
| getMidiFileTypes | back to summary |
|---|---|
| public abstract int[] getMidiFileTypes(Sequence sequence) Obtains the file types that this file writer can write from the sequence specified.
| |
| isFileTypeSupported | back to summary |
|---|---|
| public boolean isFileTypeSupported(final int fileType) Indicates whether file writing support for the specified MIDI file type is provided by this file writer.
| |
| isFileTypeSupported | back to summary |
|---|---|
| public boolean isFileTypeSupported(final int fileType, final Sequence sequence) Indicates whether a MIDI file of the file type specified can be written from the sequence indicated.
| |
| write | back to summary |
|---|---|
| public abstract int write(Sequence in, int fileType, OutputStream out) throws IOException Writes a stream of bytes representing a MIDI file of the file type indicated to the output stream provided.
| |
| write | back to summary |
|---|---|
| public abstract int write(Sequence in, int fileType, File out) throws IOException Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.
| |