Checking uploaded files for viruses
<p>I have some application. User can upload files, i save it on disk, and return it, when user want. I need implement some protection for uploaded files for viruses.
I found 3 solutions for this problem:</p>

<ol>
<li>Use online antiviruses</li>
<li>Install antivirus on my server and check uploaded file from command line</li>
<li>Integrate antivirus by sdk or api.</li>
</ol>

<p>I don't like first solution, because i send my files and private info for other server.
Second solution i think is best, but i don't know how correctly implement it.
Last solution good, but i can't find any good and famous antiviruses, who has java api.</p>

<p>Please, give me some direction for solve this problem. Mb some advice or literature.
What is best way for solve it?</p>