Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8331079

WaveFloatFileReader and WaveExtensibleFileReader throw invalid IOException

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The getAudioFileFormat(InputStream stream) methods of WaveFloatFileReader and WaveExtensibleFileReader mark the stream with a readlimit of 200. To retrieve the format they read the stream until the fmt and data chunks have been seen. There can be many other chunks in the file which have to be read before reaching the data chunk, so the readlimit can easily be exceeded, invalidating the mark. That causes an IOException when the method resets the stream. Here are some example chunk and chunk sizes for a float WAV file produced by a commercial recorder:

      bext, 1114
      iXML, 5226
      fmt , 16
      PAD , 124664
      data, 23063040


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try and read a WAV file which has chunks other than fmt and data, I can provide an example on request.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The file should load.
      ACTUAL -
      IOException is thrown, resetting to invalid mark

      FREQUENCY : always


            pnarayanaswa Praveen Narayanaswamy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: