Package com.mku.salmonfs.drive
Class HttpDrive
java.lang.Object
com.mku.fs.drive.VirtualDrive
com.mku.salmonfs.drive.AesDrive
com.mku.salmonfs.drive.HttpDrive
VirtualDrive implementation for remote HTTP file systems.
Use to store and access encrypted files.
To create an instance use static methods open() or create().
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor, use open() or create() instead. -
Method Summary
Modifier and TypeMethodDescriptionGet a private dir for sharing files with external applications.voidCalled when drive unlock fails.voidCalled when drive unlock succeeds.static AesDriveHelper method that opens and initializes an HttpDriveMethods inherited from class com.mku.salmonfs.drive.AesDrive
close, createConfigFile, createDrive, getAuthConfigFilename, getAuthId, getAuthIdBytes, getBytesFromRealFile, getConfigFile, getConfigFilename, getDefaultAuthConfigFilename, getDefaultFileChunkSize, getDriveConfig, getDriveId, getExportDir, getExportDirectoryName, getKey, getNextNonce, getRealRoot, getRoot, getSequencer, getShareDirectoryName, getVirtualDriveDirectoryName, getVirtualFile, hasConfig, initFS, initialize, openDrive, openDrive, revokeAuthorization, setAuthConfigFilename, setConfigFilename, setDefaultFileChunkSize, setExportDirectoryName, setPassword, setSequencer, setShareDirectoryName, setVirtualDriveDirectoryName
-
Constructor Details
-
HttpDrive
protected HttpDrive()Protected constructor, use open() or create() instead.
-
-
Method Details
-
open
Helper method that opens and initializes an HttpDrive- Parameters:
dir- The URL that hosts the drive. This can be either a raw URL or a REST API URL, see Salmon Web Service for usage.password- The password.- Returns:
- The drive.
- Throws:
IOException- Thrown if error occurs during opening the drive.
-
getPrivateDir
Get a private dir for sharing files with external applications.- Specified by:
getPrivateDirin classVirtualDrive- Returns:
- The private directory
- Throws:
Exception- Thrown if error occurs
-
onUnlockSuccess
public void onUnlockSuccess()Called when drive unlock succeeds.- Specified by:
onUnlockSuccessin classVirtualDrive
-
onUnlockError
public void onUnlockError()Called when drive unlock fails.- Specified by:
onUnlockErrorin classVirtualDrive
-