Class AudioUtil

java.lang.Object
com.jalios.util.AudioUtil

public class AudioUtil extends Object
  • Constructor Details

    • AudioUtil

      public AudioUtil()
  • Method Details

    • getMetaData

      public static Map<String,Object> getMetaData(File file)
      Returns the meta data of the given audio file.
      Parameters:
      file - the file to process
      Returns:
      a map of metadata
      Since:
      jcms-5.5.0
    • getDuration

      public static long getDuration(File file)
      Returns the duration of the audio file in millisecond. From http://javaalmanac.com/egs/javax.sound.sampled/Duration.html
      Parameters:
      file - the file to process
      Returns:
      the duration in millisecond.
      Since:
      jcms-5.5.0
    • getClip

      public static Clip getClip(File file)
      Returns the clip of the given audio file. Cut and Paste from http://javaalmanac.com/egs/javax.sound.sampled/Load.html
      Parameters:
      file - the file to process
      Returns:
      the clip of the given audio file
      Since:
      jcms-5.5.0
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception