Interface FileOpener


  • public interface FileOpener
    An interface for a handler, provided by a tool manager, that can open files of a particular type.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  FileOpener.Fault
      This exception is to report problems that occur while opening a file.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getFileType()
      Get an ID indicating the type of files this object can handle.
      void open​(java.io.File file)
      Open the given file in an appropriate tool.
    • Method Detail

      • getFileType

        java.lang.String getFileType()
        Get an ID indicating the type of files this object can handle.
        Returns:
        an ID indicating the type of files this object can handle.
      • open

        void open​(java.io.File file)
           throws java.io.FileNotFoundException,
                  FileOpener.Fault
        Open the given file in an appropriate tool.
        Parameters:
        file - the file to be opened
        Throws:
        java.io.FileNotFoundException - is the file cannot be found
        FileOpener.Fault - if there is a problem opening the file