question: public static int write ( Sequence in , int fileType , OutputStream out ) throws IOException { List providers = getMidiFileWriters ( ) ; int bytesWritten = - 2 ; for ( int i = 0 ; i < providers . size ( ) ; i ++ ) { MidiFileWriter writer = ( MidiFileWriter ) providers . get ( i ) ; if ( writer . isFileTypeSupported ( fileType , in ) ) { bytesWritten = writer . write ( in , fileType , out ) ; break ; } } if ( bytesWritten == - 2 ) { throw new IllegalArgumentException ( "MIDI file type is not supported" ) ; } return bytesWritten ; }
target:  Writes a stream of bytes representing a file of the MIDI file type indicated to the output stream provided.