Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/java/com/lafaspot/icap/client/IcapClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ public Future<IcapResult> scanFile(@Nonnull final URI server, @Nonnull final Str
throw new IcapException(FailureType.NOT_CONNECTED, e);
}
}

/**
* API to scan a file, will return a future object to be polled for result.
*
* @param server URI pointing to the Symantec AV scan server
* @param filename name of the file to be scanned
* @param toScanFile byte stream of the file to be scanned
* @return the future object
* @throws IcapException on failure
*/
public Future<IcapResult> scanFileWithOutSessionReuse(@Nonnull final URI server, @Nonnull final String filename, @Nonnull final byte[] toScanFile)
throws IcapException {
IcapSession sess = connect(server);
return sess.scanFile(filename, toScanFile);
}

/**
* Create a new IcapSession and connect to server.
Expand Down