Interface SongImporter
public interface SongImporter
An interface for objects able to import a song object from a file.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<String> Get the file extensions supported by all SongImporter instances.getId()A unique id or name for the importer.static List<SongImporter> Get all available SongImporters instances present in the global lookup.static List<SongImporter> getMatchingImporters(List<SongImporter> importers, String fileExtension) Select the importers which accept the specified file extension.Get the list of file types which can be read by this object.Try to build a Song object from the specified file.
-
Method Details
-
getImporters
Get all available SongImporters instances present in the global lookup.- Returns:
-
getAllSupportedFileExtensions
Get the file extensions supported by all SongImporter instances.- Returns:
-
getMatchingImporters
Select the importers which accept the specified file extension.- Parameters:
importers-fileExtension- e.g. "sng"- Returns:
-
getId
-
getSupportedFileTypes
List<FileNameExtensionFilter> getSupportedFileTypes()Get the list of file types which can be read by this object.- Returns:
- Can't be empty.
-
importFromFile
Try to build a Song object from the specified file.- Parameters:
f-- Returns:
- Throws:
IOExceptionSongCreationException
-