Skip to content

ClamAVj : a Java library for accessing the ClamAV clamd daemon

I wrote some code last week to scan files against the ClamAV antivirus scanner using the clamd daemon. It's up now on Google Code under the Apache 2.0 license.

4 Comments

  1. Jussi Siponen wrote:

    Passing 0-size byte array to scan(byte[] in) fails. Easy to fix, though:

    * now *
    try {
    read = in.read(buffer);
    }

    * should be *
    try {
    read = in.read(buffer);
    if (read == -1) {
    break;
    }
    }

    Monday, May 31, 2010 at 12:30 am | Permalink
  2. David wrote:

    thanks!
    exactly what i was looking for :)

    Sunday, September 19, 2010 at 4:01 am | Permalink
  3. Marcio wrote:

    It seems to me that, when the socket times out (while reading the response back in method scan), ClamScan will end up thinking the file contains a virus (because the response, in that case, contains a blank string).

    Tuesday, February 8, 2011 at 8:13 am | Permalink
  4. Jake wrote:

    Thanks for posting this. These classes are extremely helpful!

    Friday, May 6, 2011 at 9:11 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*