Interface Importer
public interface Importer
Interface allowing to initialize and perform import from
Camera
(list and import images).-
Method Summary
Modifier and TypeMethodDescriptionvoid
Immediately cancel all requests and active file transmissions.void
importFile
(@NotNull FileReference file, @NotNull OnReceived<byte[]> onReceived, @NotNull OnError onError, @NotNull ProgressCallback progressCallback) Import (download) a file into memory.void
importFile
(@NotNull FileReference file, @NotNull String destinationPath, @NotNull CollisionOption collisionOption, @NotNull OnCompletion onCompletion, @NotNull OnError onError, @NotNull ProgressCallback progressCallback) Import (download) a file to local drive.void
importFiles
(@NotNull List<FileReference> fileList, @NotNull String destinationPath, @NotNull CollisionOption collisionOption, @NotNull OnFileCompletion onFileCompletion, @NotNull OnFileError onFileError, @NotNull ProgressCallback progressCallback) Import (download) a list of files to local drive.listImages
(@Nullable FolderReference rootFolder) Get a list of images from the camera Important: this call is blocking and should be run on a separate thread.listImages
(@Nullable FolderReference rootFolder, @Nullable ListFlag... flags) Deprecated.@NotNull List<FolderInfo>
Get all the image folders from the camera, "workfolders" reference the user created directories where take images are stored eg "100_FLIR" , "MY_IMAGES" Important: this call is blocking and should be run on a separate thread.@NotNull List<FolderInfo>
listWorkfolders
(@Nullable FolderReference rootFolder, @Nullable ListFlag... flags) Deprecated.
-
Method Details
-
listImages
@Deprecated @NotNull @NotNull List<FileInfo> listImages(@Nullable @Nullable FolderReference rootFolder, @Nullable @Nullable ListFlag... flags) throws IOException Deprecated.Get a list of images from the camera Important: this call is blocking and should be run on a separate thread.- Parameters:
rootFolder
- root folder where listing should start, passingnull
will use camera's "active" image directoryflags
- additional listing flags, i.e. allowing to list files recursively in subfolders- Returns:
- Returns files as a list of
FileInfo
s from the camera. List may be empty. - Throws:
IOException
- When error happens during reading files from the camera.
-
listImages
@NotNull @NotNull List<FileInfo> listImages(@Nullable @Nullable FolderReference rootFolder) throws IOException Get a list of images from the camera Important: this call is blocking and should be run on a separate thread.- Parameters:
rootFolder
- root folder where listing should start, passingnull
will use camera's "active" image directory- Returns:
- Returns files as a list of
FileInfo
s from the camera. List may be empty. - Throws:
IOException
- When error happens during reading files from the camera.
-
listWorkfolders
@Deprecated @NotNull @NotNull List<FolderInfo> listWorkfolders(@Nullable @Nullable FolderReference rootFolder, @Nullable @Nullable ListFlag... flags) throws IOException Deprecated.Gets the image folders from the camera eg "100_FLIR" , "MY_IMAGES" Important: this call is blocking and should be run on a separate thread.- Parameters:
rootFolder
- root folder where listing should start, passingnull
will use camera's root directoryflags
- additional listing flags, i.e. allowing to list workfolders recursively in subfolders- Returns:
- Returns workfolders as a list of
FolderInfo
s from the camera. List may be empty. - Throws:
IOException
- When error happens during reading workfolders from the camera.
-
listWorkfolders
Get all the image folders from the camera, "workfolders" reference the user created directories where take images are stored eg "100_FLIR" , "MY_IMAGES" Important: this call is blocking and should be run on a separate thread.- Returns:
- Returns workfolders as a list of
FolderInfo
s from the camera. List may be empty. - Throws:
IOException
- When error happens during reading workfolders from the camera.
-
importFile
void importFile(@NotNull @NotNull FileReference file, @NotNull @NotNull String destinationPath, @NotNull @NotNull CollisionOption collisionOption, @NotNull @NotNull OnCompletion onCompletion, @NotNull @NotNull OnError onError, @NotNull @NotNull ProgressCallback progressCallback) Import (download) a file to local drive.- Parameters:
file
- The file to download.destinationPath
- The path where the file will be stored.collisionOption
- Behaviour for handling already existing files.onCompletion
- Called from a background thread when import is completed.onError
- Called from a background thread on any failure (will only be invoked once).progressCallback
- Called continuously from a background thread to report transmission progress.
-
importFiles
void importFiles(@NotNull @NotNull List<FileReference> fileList, @NotNull @NotNull String destinationPath, @NotNull @NotNull CollisionOption collisionOption, @NotNull @NotNull OnFileCompletion onFileCompletion, @NotNull @NotNull OnFileError onFileError, @NotNull @NotNull ProgressCallback progressCallback) Import (download) a list of files to local drive.- Parameters:
fileList
- The files to download.destinationPath
- The path where the files will be stored. Files will always be stored flat/directly in `destinationPath`, even if the files are in different folders on the camera.collisionOption
- Behaviour for handling already existing files.onFileCompletion
- Called from a background thread when import of a particular file from the import list is completed.onFileError
- Called from a background thread on any failure (will only be invoked once per file).progressCallback
- Called continuously from a background thread to report transmission progress.
-
importFile
void importFile(@NotNull @NotNull FileReference file, @NotNull @NotNull OnReceived<byte[]> onReceived, @NotNull @NotNull OnError onError, @NotNull @NotNull ProgressCallback progressCallback) Import (download) a file into memory.- Parameters:
file
- The file to download.onReceived
- Called from a background thread on success with the result (will only be invoked once).onError
- Called from a background thread on any failure (will only be invoked once).progressCallback
- Called continuously from a background thread to report transmission progress.
-
cancelAll
void cancelAll()Immediately cancel all requests and active file transmissions.
-