public class CloudScanner extends SensitivityBase
| Constructor and Description | 
|---|
| CloudScanner(java.lang.String accountId,
            java.lang.String projectId,
            java.lang.String authKey,
            java.lang.String appId,
            CloudScanListener cloudScanListener)Constructor. | 
| CloudScanner(java.lang.String accountId,
            java.lang.String projectId,
            java.lang.String authKey,
            java.lang.String appId,
            CloudScanListener cloudScanListener,
            java.lang.String serviceUrl,
            java.lang.String host)Constructor with custom service URL and host. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.String | getMimeType(java.lang.String filePath) | 
| 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. | 
public CloudScanner(java.lang.String accountId,
                    java.lang.String projectId,
                    java.lang.String authKey,
                    java.lang.String appId,
                    CloudScanListener cloudScanListener)
accountId - Your account id.projectId - Your project id.authKey - Your auth key.appId - The app id.cloudScanListener - The CloudScanListener which receives the resultspublic CloudScanner(java.lang.String accountId,
                    java.lang.String projectId,
                    java.lang.String authKey,
                    java.lang.String appId,
                    CloudScanListener cloudScanListener,
                    java.lang.String serviceUrl,
                    java.lang.String host)
accountId - Your account id.projectId - Your project id.authKey - Your auth key.appId - The app id.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.public java.lang.String getMimeType(java.lang.String filePath)