Class HttpDrive


public class HttpDrive extends AesDrive
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 Details

    • HttpDrive

      protected HttpDrive()
      Protected constructor, use open() or create() instead.
  • Method Details

    • open

      public static AesDrive open(IFile dir, String password) throws IOException
      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

      public IFile getPrivateDir() throws Exception
      Get a private dir for sharing files with external applications.
      Specified by:
      getPrivateDir in class VirtualDrive
      Returns:
      The private directory
      Throws:
      Exception - Thrown if error occurs
    • onUnlockSuccess

      public void onUnlockSuccess()
      Called when drive unlock succeeds.
      Specified by:
      onUnlockSuccess in class VirtualDrive
    • onUnlockError

      public void onUnlockError()
      Called when drive unlock fails.
      Specified by:
      onUnlockError in class VirtualDrive