public static void main(String[] args) {
    File file = new File(args[0]);
    AudioInputStream soundIn = null;
    try {
      soundIn = AudioSystem.getAudioInputStream(new BufferedInputStream(new FileInputStream(file)));
    } catch (UnsupportedAudioFileException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }

    WavReader reader = new WavReader();
    WavData wav;
    try {

      if (args.length > 1)
        wav = reader.read(soundIn, Double.parseDouble(args[1]), Double.parseDouble(args[2]));

      else
        wav = reader.read(soundIn);
      System.out.println(wav.sampleRate);
      System.out.println(wav.sampleSize);
      System.out.println(wav.getFrameSize());
      System.out.println(wav.getDuration());

      IntensityExtractor intensityFactory = new IntensityExtractor(wav);
      Contour intensity = intensityFactory.soundToIntensity();

      System.out.println("intensity points:" + intensity.size());

      for (int i = 0; i < intensity.size(); ++i) {
        System.out
            .println(
                "intensity point[" + i + "]: " + intensity.get(i) + " -- " + intensity.timeFromIndex(i));
      }
    } catch (AuToBIException e) {
      e.printStackTrace();
    }

  }