Class MalwareScanReport

    • Constructor Detail

      • MalwareScanReport

        public MalwareScanReport​(EMalwareScanOutcome outcome,
                                 String detailedScanReport,
                                 Throwable error)
        Creates a new malware scan report with the given data.
        Parameters:
        outcome - The type of the malware scan result, see getOutcome().
        detailedScanReport - Detailed scan report or message, see getDetailedScanReport().
        error - Error that occurred during scanning, if any. See also getError().
    • Method Detail

      • getDetailedScanReport

        public String getDetailedScanReport()
        Returns:
        A detailed report of the malware scan, such as the command line output or log messages of the malware scanner.
      • isSafe

        public boolean isSafe()
        Returns false if the file or data might be malware infected and should be considered unsafe. This may happen either when a malware scanner found a malware signature, or when the malware scan failed due to an unhandled error. Returns true when the file or data was scanned successfully and no malware could be detected despite best efforts. true is also returned when no malware scanner is available on the system.
        Returns:
        true if the file or data is safe and no malware was found, false otherwise.
      • isUnsafe

        public boolean isUnsafe()
        Returns true if the file or data might be malware infected and must be considered unsafe. Unsafe data must not be processed any further and should be discarded. This may happen either when a malware scanner found a malware signature, or when the malware scan failed due to an unhandled error. Returns false when the file or data was scanned successfully and no malware could be detected despite best efforts. false is also returned when no malware scanner is available on the system.
        Returns:
        true if the file or data is unsafe and may contain malware, false otherwise.