Class ClamAVClient

java.lang.Object
com.avoka.fc.core.service.impl.ClamAVClient

public class ClamAVClient extends Object
Provides an ClamAV Scan Engine Virus Scan Service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClamAVClient(String hostname, int port, int timeout)
    Create a ClamAV Scan Engine client with the given hostname and port.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    scanFile(String fileName, byte[] fileData)
    Scan the given file specified by the file name and the file byte data, returning true if the file is virus free or false, if it contains a virus.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClamAVClient

      public ClamAVClient(String hostname, int port, int timeout)
      Create a ClamAV Scan Engine client with the given hostname and port.
      Parameters:
      hostname - the server hostname
      port - the server port
      timeout - the timeout
  • Method Details

    • scanFile

      public boolean scanFile(String fileName, byte[] fileData) throws VirusScanException
      Scan the given file specified by the file name and the file byte data, returning true if the file is virus free or false, if it contains a virus.
      Parameters:
      fileName - the name of the file
      fileData - the file data bytes
      Returns:
      true if file data virus free, or false otherwise
      Throws:
      VirusScanException - if a clamAV configuration error occurs