public class ClamavVirusScannerImpl extends Object implements VirusScanner
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_NOT_FOUND_MESSAGE |
static String |
SCAN_FAILED_MESSAGE |
static String |
THREAT_FOUND_MESSAGE |
| Constructor and Description |
|---|
ClamavVirusScannerImpl() |
ClamavVirusScannerImpl(String host,
int port,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
String |
getHost() |
int |
getPort() |
int |
getTimeout() |
void |
scan(InputStream inputStream)
Scans the
InputStream for viruses. |
void |
scan(String filename)
Scans the file for virus.
|
void |
setHost(String host) |
void |
setPort(int port) |
void |
setTimeout(int timeout) |
public static final String THREAT_FOUND_MESSAGE
public static final String FILE_NOT_FOUND_MESSAGE
public static final String SCAN_FAILED_MESSAGE
public ClamavVirusScannerImpl()
public ClamavVirusScannerImpl(String host, int port, int timeout)
host - the clamd server hostport - the clamd server porttimeout - milliseconds to wait for the connectionpublic void scan(String filename)
scan in interface VirusScannerfilename - full pathpublic void scan(InputStream inputStream)
InputStream for viruses.scan in interface VirusScannerinputStream - public void setHost(String host)
host - the clamd server hostpublic void setPort(int port)
port - the clamd server portpublic void setTimeout(int timeout)
timeout - milliseconds to wait for the connectionpublic String getHost()
public int getPort()
public int getTimeout()
Copyright © 2018 CrafterCMS. All rights reserved.