Class HopFileTypeBase

    • Constructor Detail

      • HopFileTypeBase

        public HopFileTypeBase()
    • Method Detail

      • getName

        public abstract String getName()
        Specified by:
        getName in interface IHopFileType
        Returns:
        The name of this file type
      • isHandledBy

        public boolean isHandledBy​(String filename,
                                   boolean checkContent)
                            throws HopException
        Description copied from interface: IHopFileType
        Look at the given file and see if it's handled by this type. Usually this is done by simply looking at the file extension. In rare cases we look at the content.
        Specified by:
        isHandledBy in interface IHopFileType
        Parameters:
        filename - The filename
        checkContent - True if we want to look inside the file content
        Returns:
        true if this HopFile is handling the file
        Throws:
        HopException - In case something goes wrong like: file doesn't exist, a permission problem, ...
      • hasCapability

        public boolean hasCapability​(String capability)
        Description copied from interface: IHopFileType
        Check to see if the capability is present
        Specified by:
        hasCapability in interface IHopFileType
        Parameters:
        capability - The capability to check
        Returns:
        True if the capability is set to any non-null value