public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
List providers = getAudioFileWriters();
Set returnTypesSet = new HashSet();
for(int i=0; i < providers.size(); i++) {
AudioFileWriter writer = (AudioFileWriter) providers.get(i);
AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
for(int j=0; j < fileTypes.length; j++) {
returnTypesSet.add(fileTypes[j]);
}
}
AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])