public class ClamAVClient extends Object
| Constructor and Description |
|---|
ClamAVClient(String hostName,
int port) |
ClamAVClient(String hostName,
int port,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isCleanReply(byte[] reply) |
boolean |
ping()
Run PING command to clamd to test it is responding.
|
byte[] |
scan(byte[] in) |
byte[] |
scan(InputStream is)
Streams the given data to the server in chunks.
|
public ClamAVClient(String hostName, int port, int timeout)
timeout - zero means infinite timeout. Not a good idea, but will be accepted.public ClamAVClient(String hostName, int port)
public boolean ping()
throws IOException
IOExceptionpublic byte[] scan(InputStream is) throws IOException
Opens a socket and reads the reply. Parameter input stream is NOT closed.
is - data to scan. Not closed by this method!IOExceptionpublic byte[] scan(byte[] in)
throws IOException
in - data to scanIOExceptionpublic static boolean isCleanReply(byte[] reply)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2014. All Rights Reserved.