com.jalios.util
Class AudioUtil

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

public class AudioUtil
extends java.lang.Object


Constructor Summary
AudioUtil()
           
 
Method Summary
static javax.sound.sampled.Clip getClip(java.io.File file)
          Returns the clip of the given audio file.
static long getDuration(java.io.File file)
          Returns the duration of the audio file in millisecond.
static java.util.Map getMetaData(java.io.File file)
          Returns the meta data of the given audio file.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioUtil

public AudioUtil()
Method Detail

getMetaData

public static java.util.Map getMetaData(java.io.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(java.io.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 javax.sound.sampled.Clip getClip(java.io.File file)
Returns the clip of the given audio file. Cut&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(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2001-2010 Jalios SA. All Rights Reserved.