Package adams.data.io

Class FileFormatHandlerUtils


  • public class FileFormatHandlerUtils
    extends Object
    Helper class for FileFormatHandler.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • FileFormatHandlerUtils

        public FileFormatHandlerUtils()
    • Method Detail

      • getHandlerForFile

        public static List<Class> getHandlerForFile​(Class superclass,
                                                    String filename)
        Returns the list of handlers that can handle the specified file. The classes must implement the FileFormatHandler interface.
        Parameters:
        superclass - the superclass of the handlers
        filename - the file to get handler(s) for
        Returns:
        the list of handlers
      • getHandlerForFile

        public static List<Class> getHandlerForFile​(Class superclass,
                                                    File file)
        Returns the list of handlers that can handle the specified file. The classes must implement the FileFormatHandler interface.
        Parameters:
        superclass - the superclass of the handlers
        file - the file to get handler(s) for
        Returns:
        the list of handlers
      • getHandlerForExtension

        public static List<Class> getHandlerForExtension​(Class superclass,
                                                         String extension)
        Returns the list of handlers that can handle the specified extension. The classes must implement the FileFormatHandler interface.
        Parameters:
        superclass - the superclass of the handlers
        extension - the extension to check (no dot)
        Returns:
        the list of handlers