public class CloudScanner extends SensitivityBase
host, serviceUrl
Constructor and Description |
---|
CloudScanner(android.content.Context context,
CloudScanListener cloudScanListener)
Constructor.
|
CloudScanner(android.content.Context context,
CloudScanListener cloudScanListener,
java.lang.String serviceUrl,
java.lang.String host)
Constructor with custom service URL and host.
|
Modifier and Type | Method and Description |
---|---|
void |
scanFiles(java.util.List<java.io.File> files,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple files.
|
void |
scanFiles(java.util.List<java.io.File> files,
boolean stopAtFirst,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple files.
|
void |
scanFiles(java.util.List<java.io.File> files,
int stopAt,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple files.
|
void |
scanStrings(java.util.List<java.lang.String> strings,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple strings.
|
void |
scanStrings(java.util.List<java.lang.String> strings,
boolean stopAtFirst,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple strings.
|
void |
scanStrings(java.util.List<java.lang.String> strings,
int stopAt,
boolean verbose,
boolean masked)
Executes a cloud scan of multiple strings.
|
getAccountId, getAppId, getAuthKey, getContext, getPrefs, getProjectId, isRegistered
public CloudScanner(android.content.Context context, CloudScanListener cloudScanListener)
context
- The context.cloudScanListener
- The CloudScanListener
which receives the results.public CloudScanner(android.content.Context context, CloudScanListener cloudScanListener, java.lang.String serviceUrl, java.lang.String host)
context
- The context.cloudScanListener
- The CloudScanListener
which receives the results.serviceUrl
- The service URL for the server. The default service URL is "https://api.sensitivity.io/api/v1/".host
- The host for the server. The default host is "api.sensitivity.io".public void scanFiles(java.util.List<java.io.File> files, boolean verbose, boolean masked) throws ScanFailedException
files
- The files to be scanned.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.public void scanFiles(java.util.List<java.io.File> files, boolean stopAtFirst, boolean verbose, boolean masked) throws ScanFailedException
files
- The files to be scanned.stopAtFirst
- If true, it will stop after the first threat is found. If false, it will scan the whole file.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.public void scanFiles(java.util.List<java.io.File> files, int stopAt, boolean verbose, boolean masked) throws ScanFailedException
files
- The files to be scanned.stopAt
- The scanner will stop after this many threats were found.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.public void scanStrings(java.util.List<java.lang.String> strings, boolean verbose, boolean masked) throws ScanFailedException
strings
- The strings to be scanned.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.public void scanStrings(java.util.List<java.lang.String> strings, boolean stopAtFirst, boolean verbose, boolean masked) throws ScanFailedException
strings
- The strings to be scanned.stopAtFirst
- If true, it will stop after the first threat is found. If false, it will scan the whole string.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.public void scanStrings(java.util.List<java.lang.String> strings, int stopAt, boolean verbose, boolean masked) throws ScanFailedException
strings
- The strings to be scanned.stopAt
- The scanner will stop after this many threats were found.verbose
- If true, it will return detailed threat information. If false, it will return light threat information.masked
- If true, the threats will be masked. If false, they will be visible.ScanFailedException
- If the scanning failed.