javax.sound.midi.spi
public abstract class MidiFileWriter extends Object
Constructor and Description |
---|
MidiFileWriter() |
Modifier and Type | Method and Description |
---|---|
abstract int[] |
getMidiFileTypes()
Return the MIDI file types supported by this writer.
|
abstract int[] |
getMidiFileTypes(Sequence sequence)
Return the MIDI file types supported by this writer for the
given sequence.
|
boolean |
isFileTypeSupported(int fileType)
Returns true if this writer supports the given file type.
|
boolean |
isFileTypeSupported(int fileType,
Sequence sequence)
Returns true if this writer supports the given file type for the
given sequence.
|
abstract int |
write(Sequence in,
int fileType,
File out)
Write a sequence to a file using the specified MIDI file type.
|
abstract int |
write(Sequence in,
int fileType,
OutputStream out)
Write a sequence to a stream using the specified MIDI file type.
|
public MidiFileWriter()
public abstract int[] getMidiFileTypes()
public abstract int[] getMidiFileTypes(Sequence sequence)
sequence
- the sequence we'd like to writepublic boolean isFileTypeSupported(int fileType)
fileType
- the file type we're asking aboutpublic boolean isFileTypeSupported(int fileType, Sequence sequence)
fileType
- the file type we're asking aboutsequence
- the sequence we'd like to writepublic abstract int write(Sequence in, int fileType, OutputStream out) throws IOException
in
- the sequence to writefileType
- the MIDI file type to useout
- the output stream to write toIOException
- if an I/O exception happenspublic abstract int write(Sequence in, int fileType, File out) throws IOException
in
- the sequence to writefileType
- the MIDI file type to useout
- the file to write toIOException
- if an I/O exception happens