Package com.mku.salmon.utils
Class SalmonFileImporter
java.lang.Object
com.mku.utils.FileImporter
com.mku.salmon.utils.SalmonFileImporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longimportFile(IRealFile fileToImport, IVirtualFile dir, String filename, boolean deleteSource, boolean integrity, BiConsumer<Long, Long> onProgress) Imports a real file into the drive.protected voidonPrepare(IVirtualFile importedFile, boolean integrity) Methods inherited from class com.mku.utils.FileImporter
close, finalize, initialize, isRunning, stop
-
Constructor Details
-
SalmonFileImporter
public SalmonFileImporter(int bufferSize, int threads)
-
-
Method Details
-
onPrepare
- Specified by:
onPreparein classFileImporter- Throws:
IOException
-
getMinimumPartSize
- Specified by:
getMinimumPartSizein classFileImporter- Throws:
IOException
-
importFile
public SalmonFile importFile(IRealFile fileToImport, IVirtualFile dir, String filename, boolean deleteSource, boolean integrity, BiConsumer<Long, Long> onProgress) throws ExceptionDescription copied from class:FileImporterImports a real file into the drive.- Overrides:
importFilein classFileImporter- Parameters:
fileToImport- The source file that will be imported in to the drive.dir- The target directory in the drive that the file will be importedfilename- The filename to usedeleteSource- If true delete the source file.integrity- Apply data integrityonProgress- Progress to notify- Returns:
- The imported file
- Throws:
Exception- Thrown if error occurs during import
-