public class BlobManager
Manages binary files on local filesystem and provides access to binary files stored remotely
| Constructor and Description |
|---|
BlobManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allBlobsAvailable() |
java.util.HashSet<net.doo.snap.entity.Blob> |
blobsToDownload() |
long |
fetch()
Launches asynchronous fetch of a given net.doo.snap.entity.Blob if it is not already available in local destination folder. Might perform blocking operations, so it should not be called from the main thread.
|
java.util.Set<net.doo.snap.entity.Language> |
getAllLanguagesWithAvailableOcrBlobs() |
java.io.File |
getBanksDataFile() |
java.io.File |
getMRZTraineddataFile() |
java.io.File |
getOCRBlobsDirectory() |
boolean |
hasActiveDownloads() |
boolean |
isBlobAvailable() |
public boolean allBlobsAvailable()
true if all blobs from collection are available locally. false if at least one blob is not available. If collection is empty returns truepublic boolean isBlobAvailable()
true if net.doo.snap.entity.Blob is available on local filesystem. false otherwise.public java.util.Set<net.doo.snap.entity.Language> getAllLanguagesWithAvailableOcrBlobs()
BlobManager.isBlobAvailablepublic java.io.File getOCRBlobsDirectory()
public java.io.File getBanksDataFile()
public java.io.File getMRZTraineddataFile()
public long fetch()
Launches asynchronous fetch of a given net.doo.snap.entity.Blob if it is not already available in local destination folder. Might perform blocking operations, so it should not be called from the main thread.
-1 if blob is available locallyBlobManager.isBlobAvailablepublic boolean hasActiveDownloads()
true if some blobs are still in fetch process (or paused). false if all requested downloads completed. This method performs blocking operation, so it should not be called from the main thread.public java.util.HashSet<net.doo.snap.entity.Blob> blobsToDownload()