Interface Importer


public interface Importer
Interface allowing to initialize and perform import from Camera (list and import images).
  • 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, passing null will use camera's "active" image directory
      flags - additional listing flags, i.e. allowing to list files recursively in subfolders
      Returns:
      Returns files as a list of FileInfos 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, passing null will use camera's "active" image directory
      Returns:
      Returns files as a list of FileInfos 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, passing null will use camera's root directory
      flags - additional listing flags, i.e. allowing to list workfolders recursively in subfolders
      Returns:
      Returns workfolders as a list of FolderInfos from the camera. List may be empty.
      Throws:
      IOException - When error happens during reading workfolders from the camera.
    • listWorkfolders

      @NotNull @NotNull List<FolderInfo> listWorkfolders() throws IOException
      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 FolderInfos 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.