Class AudioResource


  • public class AudioResource
    extends Resource
    A Resource wrapping a File containing sounds.
    See Also:
    Resource
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File file  
    • Constructor Summary

      Constructors 
      Constructor Description
      AudioResource​(java.lang.String primaryKey, java.io.File file)  
      AudioResource​(java.lang.String primaryKey, java.net.URI resourceLocator)
      Do not use directly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getAudio()
      Gets the file represented by this resource.
      void preload()
      Preload the resource if possible/meaningful.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • file

        private java.io.File file
    • Constructor Detail

      • AudioResource

        public AudioResource​(java.lang.String primaryKey,
                             java.io.File file)
      • AudioResource

        public AudioResource​(java.lang.String primaryKey,
                             java.net.URI resourceLocator)
                      throws java.io.IOException
        Do not use directly.
        Parameters:
        primaryKey - The primary key.
        resourceLocator - The URI used when loading this resource.
        Throws:
        java.io.IOException - if the URI does not point to recognizable audio.
    • Method Detail

      • preload

        public void preload()
        Preload the resource if possible/meaningful.
        Specified by:
        preload in class Resource
      • getAudio

        public java.io.File getAudio()
        Gets the file represented by this resource.
        Returns:
        The File for this resource.