Class AudioInfo

java.lang.Object
com.jackmeng.halcyoninae.tailwind.AudioInfo
Direct Known Subclasses:
StubAudioInfo

public class AudioInfo extends Object
This class holds information regarding an audio file; specifically, an MP3 file which can be parsed into ID3 tags.

Other formats that are supported such as raw PCM,WAV,OGG are not parsable.

Since:
3.0
Author:
Jack Meng
  • Field Details

  • Constructor Details

    • AudioInfo

      public AudioInfo(File f)
      Constructs the AudioInfo object with the specified file.
      Parameters:
      f - The file to construct the AudioInfo object with.
    • AudioInfo

      public AudioInfo(File f, boolean s) throws org.jaudiotagger.audio.exceptions.InvalidAudioFrameException, org.jaudiotagger.audio.exceptions.CannotReadException, IOException, org.jaudiotagger.tag.TagException, org.jaudiotagger.audio.exceptions.ReadOnlyFileException
      Throws:
      org.jaudiotagger.audio.exceptions.InvalidAudioFrameException
      org.jaudiotagger.audio.exceptions.CannotReadException
      IOException
      org.jaudiotagger.tag.TagException
      org.jaudiotagger.audio.exceptions.ReadOnlyFileException
    • AudioInfo

      public AudioInfo(String locale)
      Constructs the AudioInfo object with the specified file path.
      Parameters:
      locale - The file path to construct the AudioInfo object with. (ABSOLUTE FILE PATH)
    • AudioInfo

      public AudioInfo()
      Initializes the tags map and adds default values to the map

      Default init

  • Method Details

    • getDefaultIcon

      public static BufferedImage getDefaultIcon()
      Returns:
      BufferedImage
    • checkAudioInfo

      public static boolean checkAudioInfo(AudioInfo info)
      Parameters:
      info -
      Returns:
      boolean
    • checkEmptiness

      public boolean checkEmptiness(String s)
      Checks if the given String is in any way empty.
      Parameters:
      s - The string to check
      Returns:
      (true | | false) Depending on if the string is empty or not.
    • forceSet

      public void forceSet(Map<String,String> forceSetMap)
      Parameters:
      forceSetMap -
    • defInitTags

      public void defInitTags()
      Initializes the tags map and adds default values to the map
    • initTags

      public void initTags()
      Initializes the tags map and adds the appropriate values from the parsed Audio File to the map.
    • getArtwork

      public BufferedImage getArtwork()
      Returns the artwork of the Audio File, if there isn't any, then it returns the specified default artwork.
      Returns:
      A BufferedImage representing the artwork without any modifications.
    • hasArtwork

      public boolean hasArtwork()
      Returns:
      boolean
    • getTags

      public Map<String,String> getTags()
      Returns the map of tags to the Audio file
      Returns:
      A Map of String, String representing the parsed tags from the audio file.
    • getTag

      public String getTag(String key)
      Get a specific key from the parsed tags
      Parameters:
      key - the Key see above
      Returns:
      The value of the key
    • getRaw

      public String getRaw(org.jaudiotagger.tag.FieldKey key)
      Returns the value raw from the tagger. Checking is done to avoid any type of exceptions
      Parameters:
      key - A FieldKey object representing the desired value to seek for.
      Returns:
      The value of the key.
    • launchAsDialog

      public AudioInfoDialog launchAsDialog()
      Returns:
      AudioInfoDialog
    • extractArtwork

      public static void extractArtwork(AudioInfo ai)
      Parameters:
      ai -