Interface SongImporter


public interface SongImporter
An interface for objects able to import a song object from a file.
  • Method Details

    • getImporters

      static List<SongImporter> getImporters()
      Get all available SongImporters instances present in the global lookup.
      Returns:
    • getAllSupportedFileExtensions

      static Collection<String> getAllSupportedFileExtensions()
      Get the file extensions supported by all SongImporter instances.
      Returns:
    • getMatchingImporters

      static List<SongImporter> getMatchingImporters(List<SongImporter> importers, String fileExtension)
      Select the importers which accept the specified file extension.
      Parameters:
      importers -
      fileExtension - e.g. "sng"
      Returns:
    • getId

      String getId()
      A unique id or name for the importer.
      Returns:
    • getSupportedFileTypes

      List<FileNameExtensionFilter> getSupportedFileTypes()
      Get the list of file types which can be read by this object.
      Returns:
      Can't be empty.
    • importFromFile

      Song importFromFile(File f) throws IOException, SongCreationException
      Try to build a Song object from the specified file.

      Parameters:
      f -
      Returns:
      Throws:
      IOException
      SongCreationException