Class ClamavVirusScannerImpl

  • All Implemented Interfaces:
    VirusScanner

    public class ClamavVirusScannerImpl
    extends Object
    implements VirusScanner
    A virus scanner that uses ClamScan to scan input-streams/files
    • Constructor Detail

      • ClamavVirusScannerImpl

        public ClamavVirusScannerImpl()
      • ClamavVirusScannerImpl

        public ClamavVirusScannerImpl​(String host,
                                      int port,
                                      int timeout)
        Parameters:
        host - the clamd server host
        port - the clamd server port
        timeout - milliseconds to wait for the connection
    • Method Detail

      • scan

        public void scan​(String filename)
        Scans the file for virus.
        Specified by:
        scan in interface VirusScanner
        Parameters:
        filename - full path
      • setHost

        public void setHost​(String host)
        Parameters:
        host - the clamd server host
      • setPort

        public void setPort​(int port)
        Parameters:
        port - the clamd server port
      • setTimeout

        public void setTimeout​(int timeout)
        Parameters:
        timeout - milliseconds to wait for the connection
      • getHost

        public String getHost()
        Returns:
        the clamd server host
      • getPort

        public int getPort()
        Returns:
        the clamd server port
      • getTimeout

        public int getTimeout()
        Returns:
        the milliseconds to wait for the connection