targetFormat.getEncoding().equals(SpeexEncoding.SPEEX)) {
targetFormat.getEncoding() instanceof SpeexEncoding) {
  public AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding,                                              AudioInputStream sourceStream)  {    if (isConversionSupported(targetEncoding, sourceStream.getFormat())) {      AudioFormat[] formats = getTargetFormats(targetEncoding,                                               sourceStream.getFormat());      if (formats != null && formats.length > 0) {        AudioFormat sourceFormat = sourceStream.getFormat();        AudioFormat targetFormat = formats[0];        if (sourceFormat.equals(targetFormat)) {          return sourceStream;        }        else if (sourceFormat.getEncoding().equals(SpeexEncoding.SPEEX) &&                 targetFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED)) {          return new Speex2PcmAudioInputStream(sourceStream, targetFormat, -1);        }        else if (sourceFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED) &&                 targetFormat.getEncoding().equals(SpeexEncoding.SPEEX)) {          return new Pcm2SpeexAudioInputStream(sourceStream, targetFormat, -1);        }        else {          throw new IllegalArgumentException("unable to convert " + sourceFormat.toString() +                                             " to " + targetFormat.toString());        }      }      else {        throw new IllegalArgumentException("target format not found");      }    }    else {      throw new IllegalArgumentException("conversion not supported");    }  }