com.ikarus.ScanService
Class Sender

java.lang.Object
  extended by com.ikarus.ScanService.Sender

public class Sender
extends java.lang.Object


Constructor Summary
Sender()
           
 
Method Summary
static void main(java.lang.String[] args)
          This method takes a full qualified server URL and a full qualified filepath that are send to the defined server.
static Result send(java.net.URI host, byte[] bytes)
          This methods sends a given array of bytes to the IKARUS ScanService.
static Result send(java.net.URI host, java.io.InputStream inStream)
          This methods sends a given InputStream to the IKARUS ScanService.
static Result send(java.net.URI host, java.lang.String filename)
          This methods sends a file identified by a filename to the IKARUS ScanService.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sender

public Sender()
Method Detail

send

public static Result send(java.net.URI host,
                          java.lang.String filename)
                   throws java.io.IOException
This methods sends a file identified by a filename to the IKARUS ScanService.

Parameters:
host - A full qualified URL to the service like http://localhost:8080/virusscan
filename - The file name that identifies the file to be scanned.
Returns:
A Result object containing the results by the IKARUS ScanService.
Throws:
java.io.IOException - Is thrown in case of communications issues.

send

public static Result send(java.net.URI host,
                          java.io.InputStream inStream)
                   throws java.io.IOException
This methods sends a given InputStream to the IKARUS ScanService.

Parameters:
host - A full qualified URL to the service like http://localhost:8080/virusscan
inStream - The InputStream name that is to be scanned.
Returns:
A Result object containing the results by the IKARUS ScanService.
Throws:
java.io.IOException - Is thrown in case of communications issues.

send

public static Result send(java.net.URI host,
                          byte[] bytes)
                   throws java.io.IOException
This methods sends a given array of bytes to the IKARUS ScanService.

Parameters:
host - A full qualified URL to the service like http://localhost:8080/virusscan
bytes - The byte array holding the data to be scanned.
Returns:
A Result object containing the results by the IKARUS ScanService.
Throws:
java.io.IOException - Is thrown in case of communications issues.

main

public static void main(java.lang.String[] args)
This method takes a full qualified server URL and a full qualified filepath that are send to the defined server. The result of the IKScanService is thereafter displayed on the shell.

Parameters:
args - There have to be exactly two arguments. The first specifies the IKScanService the second the file to be scanned. A brief helpt is displayed if an argument is missing.