All Packages Class Hierarchy This Package Previous Next Index
Class com.starla.lite.PCShare
java.lang.Object
|
+----com.starla.lite.PCShare
- public final class PCShare
- extends Object
PC share class.
The PC share class holds the details of a network share, including the
required username and password access control.
-
PCShare()
- Construct an empty PCShare object.
-
PCShare(String)
- Construct a PCShare using the supplied UNC path.
-
PCShare(String, String, String, String)
- Construct a PCShare using the specified remote server and access control
details.
-
getFileName()
- Get the remote file name string.
-
getNetworkPath()
- Return the full UNC path for this PC share object.
-
getNodeName()
- Get the remote node name string.
-
getPassword()
- Get the remote password required to access the remote share.
-
getPath()
- Get the share relative path string.
-
getRelativePath()
- Return the share relative path for this PC share object.
-
getShareName()
- Get the remote share name string.
-
getUserName()
- Get the remote user name string.
-
makePath(String, String)
- Build a share relative path using the supplied working directory and
file name.
-
setFileName(String)
- Set the remote file name string.
-
setNetworkPath(String)
- Set the PC share from the supplied UNC path string.
-
setNodeName(String)
- Set the remote node name string.
-
setPassword(String)
- Set the remote password string.
-
setPath(String)
- Set the share relative path string.
-
setShareName(String)
- Set the remote share name string.
-
setUserName(String)
- Set the remote user name string.
-
toString()
- Return the PCShare object as a string
PCShare
public PCShare()
- Construct an empty PCShare object.
PCShare
public PCShare(String netpath) throws InvalidUNCPathException
- Construct a PCShare using the supplied UNC path.
- Parameters:
- netpath - Network path of the remote server, in UNC format ie.
\\node\share.
- Throws: InvalidUNCPathException
- If the network path is invalid.
PCShare
public PCShare(String nname,
String shr,
String uname,
String pwd)
- Construct a PCShare using the specified remote server and access control
details.
- Parameters:
- nname - Node name of the remote server.
- shr - Share name on the remote server.
- uname - User name used to access the remote share.
- pwd - Password used to access the remote share.
getFileName
public final String getFileName()
- Get the remote file name string.
- Returns:
- Remote file name string.
getNetworkPath
public final String getNetworkPath()
- Return the full UNC path for this PC share object.
- Returns:
- Path string of the remote share/path/file in UNC format, ie.
\\node\share\path\file.
getNodeName
public final String getNodeName()
- Get the remote node name string.
- Returns:
- Node name string.
getPassword
public final String getPassword()
- Get the remote password required to access the remote share.
- Returns:
- Remote password string.
getPath
public final String getPath()
- Get the share relative path string.
- Returns:
- Share relative path string.
getRelativePath
public final String getRelativePath()
- Return the share relative path for this PC share object.
- Returns:
- Path string of the remote share/path/file relative to the
share, ie. \path\file.
getShareName
public final String getShareName()
- Get the remote share name string.
- Returns:
- Remote share name string.
getUserName
public final String getUserName()
- Get the remote user name string.
- Returns:
- Remote user name string required to access the remote share.
makePath
public static String makePath(String workdir,
String fname)
- Build a share relative path using the supplied working directory and
file name.
- Parameters:
- workdir - Working directory string, relative to the root of the share.
- fname - File name string.
- Returns:
- Share relative path string.
setFileName
public final void setFileName(String fn)
- Set the remote file name string.
- Parameters:
- fn - Remote file name string.
setNetworkPath
public final void setNetworkPath(String netpath) throws InvalidUNCPathException
- Set the PC share from the supplied UNC path string.
- Parameters:
- netpath - UNC format remote file path.
setNodeName
public final void setNodeName(String nname)
- Set the remote node name string.
- Parameters:
- nname - Remote node name string.
setPassword
public final void setPassword(String pwd)
- Set the remote password string.
- Parameters:
- pwd - Remote password string, required to access the remote share.
setPath
public final void setPath(String pth)
- Set the share relative path string.
- Parameters:
- pth - Share relative path string.
setShareName
public final void setShareName(String shr)
- Set the remote share name string.
- Parameters:
- shr - Remote share name string.
setUserName
public final void setUserName(String uname)
- Set the remote user name string.
- Parameters:
- uname - Remote user name string.
toString
public final String toString()
- Return the PCShare object as a string
- Returns:
- PCShare string.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index