code: @Override
    public Type[] getAudioFileTypes(AudioInputStream stream) {
      AudioFileFormat.Type[] filetypes = getAudioFileTypes();
  
      // make sure we can write this stream
      AudioFormat format = stream.getFormat();
      if(AudioStreamEncoder.getDataFormatSupport(format) == AudioStreamEncoder.SUPPORTED ) {
         return filetypes;
      }
      return new AudioFileFormat.Type[0];
    }
docs: /*
  (non-Javadoc)
  
  @see javax.sound.sampled.spi.AudioFileWriter#getAudioFileTypes(javax.sound.sampled.AudioInputStream)