Class CifsMounter


  • public class CifsMounter
    extends Object
    CIFS Mounter Class

    Mount/map a network drive taking care of platform differences.

    Author:
    gkspencer
    • Constructor Detail

      • CifsMounter

        public CifsMounter()
        Default constructor
      • CifsMounter

        public CifsMounter​(String srvName,
                           String shareName,
                           String userName,
                           String password)
        Class constructor
        Parameters:
        srvName - String
        shareName - String
        userName - String
        password - String
    • Method Detail

      • unmountFilesystem

        public void unmountFilesystem​(String driveLetter,
                                      String mountPoint)
                               throws CifsMountException
        Unmount a remote CIFS shared filesystem
        Parameters:
        driveLetter - String
        mountPoint - String
        Throws:
        CifsMountException
      • getServerName

        public final String getServerName()
        Return the server name
        Returns:
        String
      • getServerAddress

        public final String getServerAddress()
        Return hte server address
        Returns:
        String
      • getShareName

        public final String getShareName()
        Return the share name
        Returns:
        String
      • getUserName

        public final String getUserName()
        Return the user name
        Returns:
        String
      • getPassword

        public final String getPassword()
        Return the password
        Returns:
        String
      • isProtocolType

        public final int isProtocolType()
        Return the protocol type
        Returns:
        int
      • getProtocolPort

        public final int getProtocolPort()
        Return the protocol port
        Returns:
        int
      • setServerName

        public final void setServerName​(String name)
        Set the server name
        Parameters:
        name - String
      • setServerAddress

        public final void setServerAddress​(String srvAddr)
        Set the server address
        Parameters:
        srvAddr - String
      • setShareName

        public final void setShareName​(String name)
        Set the share name
        Parameters:
        name - String
      • setUserName

        public final void setUserName​(String user)
        Set the user name
        Parameters:
        user - String
      • setPassword

        public final void setPassword​(String password)
        Set the password
        Parameters:
        password - String
      • setProtocolType

        public final void setProtocolType​(int proto)
        Set the protocol type to use
        Parameters:
        proto - int
      • setProtocolPort

        public final void setProtocolPort​(int port)
        Set the port to use for the connection
        Parameters:
        port - int
      • toString

        public String toString()
        Return the CIFS mounter as a string
        Overrides:
        toString in class Object
        Returns:
        String