public class ClamScan extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHUNK_SIZE |
Constructor and Description |
---|
ClamScan() |
ClamScan(String host,
int port,
int timeout) |
Modifier and Type | Method and Description |
---|---|
String |
cmd(byte[] cmd) |
String |
getHost() |
int |
getPort() |
int |
getTimeout() |
boolean |
ping() |
ScanResult |
scan(byte[] in)
The method to call if you already have the content to scan in-memory as a byte array.
|
ScanResult |
scan(InputStream in)
The preferred method to call.
|
void |
setHost(String host) |
void |
setPort(int port) |
void |
setTimeout(int timeout)
Socket timeout in milliseconds
|
String |
stats() |
public static final int CHUNK_SIZE
public ClamScan()
public ClamScan(String host, int port, int timeout)
public String stats()
public boolean ping()
public String cmd(byte[] cmd)
public ScanResult scan(byte[] in) throws IOException
in
- the byte array to scanIOException
public ScanResult scan(InputStream in)
in
- the InputStream to read. The stream is NOT closed by this method.public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public int getTimeout()
public void setTimeout(int timeout)
timeout
- socket timeout in millisecondsCopyright © 2023 CrafterCMS. All rights reserved.