code: @Override
      public AudioFileFormat getAudioFileFormat(InputStream inputStream)
              throws UnsupportedAudioFileException, IOException {
          LOG.log(Level.FINE, "TAudioFileReader.getAudioFileFormat(InputStream): begin (class: {0})", getClass().getSimpleName());
          long lFileLengthInBytes = AudioSystem.NOT_SPECIFIED;
          if (!inputStream.markSupported()) {
              inputStream = new BufferedInputStream(inputStream, getMarkLimit());
          }
          inputStream.mark(getMarkLimit());
          AudioFileFormat audioFileFormat;
          try {
              audioFileFormat = getAudioFileFormat(inputStream, lFileLengthInBytes);
          } finally {
              /* TODO: required semantics is unclear: should reset()
               be executed only when there is an exception or
               should it be done always?
               */
              inputStream.reset();
          }
          LOG.log(Level.FINE, "TAudioFileReader.getAudioFileFormat(InputStream): end");
          return audioFileFormat;
      }
docs: Get an AudioFileFormat object for an InputStream. This method calls
  getAudioFileFormat(InputStream, long). Subclasses should not override
  this method unless there are really severe reasons. Normally, it is
  sufficient to implement getAudioFileFormat(InputStream, long).
  
  @param inputStream	the stream to read from.
  @return	an AudioFileFormat instance containing information from the
  header of the stream passed in.
  @throws javax.sound.sampled.UnsupportedAudioFileException
  @throws java.io.IOException