Class EncryptedFileIOProcessor
-
- All Implemented Interfaces:
-
io.scanbot.sdk.persistence.fileio.BaseFileIOProcessor,io.scanbot.sdk.persistence.fileio.CoreStreamProvider,io.scanbot.sdk.persistence.fileio.FileIOProcessor,io.scanbot.sdk.persistence.fileio.ImageFileIOProcessor
public final class EncryptedFileIOProcessor implements FileIOProcessor
Represents encryption/decryption file IO operations.
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanuseEncryptionprivate final Contextcontext
-
Constructor Summary
Constructors Constructor Description EncryptedFileIOProcessor(Context context)
-
Method Summary
Modifier and Type Method Description BooleangetUseEncryption()final ContextgetContext()UnitwriteImage(Bitmap bitmap, Bitmap.CompressFormat compressFormat, Integer quality, File destination)Write Bitmap to the destination File BitmapreadImage(File source, BitmapFactory.Options options)Read Bitmap image from the source File BitmapreadImage(Uri sourceUri, BitmapFactory.Options options)Read Bitmap image from the source file Uri ByteArrayread(File source)Read ByteArray data from the source File Unitwrite(ByteArray byteArray, File destination)Write ByteArray data to the destination File UnitcopyRaw(File encryptedSource, File destination)Decrypts encryptedSource file and creates unencrypted copy in the destination file. Unitcopy(File source, File destination)Creates a copy of the source file to the destination file with encryption if its enabled Unitmove(File source, File destination)Creates a copy of the source file to the destination file and deletes the source file. OutputStreamopenFileOutputStream(File destinationFile)Returns OutputStream for the destination file InputStreamopenFileInputStream(File sourceFile)Returns OutputStream for the source file -
-
Constructor Detail
-
EncryptedFileIOProcessor
EncryptedFileIOProcessor(Context context)
-
-
Method Detail
-
getUseEncryption
Boolean getUseEncryption()
-
getContext
final Context getContext()
-
writeImage
@Synchronized() Unit writeImage(Bitmap bitmap, Bitmap.CompressFormat compressFormat, Integer quality, File destination)
- Parameters:
bitmap- the source Bitmap imagecompressFormat- Bitmap.CompressFormat The format of the compressed imagequality- Int Hint to the compressor, 0-100.destination- the destination file
-
readImage
@Synchronized() Bitmap readImage(File source, BitmapFactory.Options options)
- Parameters:
source- the source file object, or null if it could not be decoded.
-
readImage
@Synchronized() Bitmap readImage(Uri sourceUri, BitmapFactory.Options options)
-
read
@Synchronized() ByteArray read(File source)
- Parameters:
source- the source file object, or null if it could not be decoded.
-
write
@Synchronized() Unit write(ByteArray byteArray, File destination)
- Parameters:
byteArray- data to writedestination- the destination file
-
copyRaw
@Synchronized() Unit copyRaw(File encryptedSource, File destination)
Decrypts encryptedSource file and creates unencrypted copy in the destination file.
-
copy
Unit copy(File source, File destination)
Creates a copy of the source file to the destination file with encryption if its enabled
-
move
Unit move(File source, File destination)
Creates a copy of the source file to the destination file and deletes the source file. Encryption is applied if enabled.
-
openFileOutputStream
@Synchronized() OutputStream openFileOutputStream(File destinationFile)
Returns OutputStream for the destination file
-
openFileInputStream
@Synchronized() InputStream openFileInputStream(File sourceFile)
Returns OutputStream for the source file
-
-
-
-