Class SmbFileName
- java.lang.Object
-
- org.apache.commons.vfs.provider.AbstractFileName
-
- org.apache.commons.vfs.provider.GenericFileName
-
- org.apache.commons.vfs.provider.smb.SmbFileName
-
- All Implemented Interfaces:
java.lang.Comparable
,org.apache.commons.vfs.FileName
public class SmbFileName extends org.apache.commons.vfs.provider.GenericFileName
An SMB URI. Adds a share name to the generic URI.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SmbFileName(java.lang.String scheme, java.lang.String hostName, int port, java.lang.String userName, java.lang.String password, java.lang.String domain, java.lang.String share, java.lang.String path, org.apache.commons.vfs.FileType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendCredentials(java.lang.StringBuffer buffer, boolean addPassword)
put domain before username if both are setprotected void
appendRootUri(java.lang.StringBuffer buffer, boolean addPassword)
Builds the root URI for this file name.org.apache.commons.vfs.FileName
createName(java.lang.String path, org.apache.commons.vfs.FileType type)
Factory method for creating name instances.java.lang.String
getDomain()
returns the domain namejava.lang.String
getShare()
Returns the share name.java.lang.String
getUriWithoutAuth()
Construct the path suitable for SmbFile when used with NtlmPasswordAuthentication-
Methods inherited from class org.apache.commons.vfs.provider.GenericFileName
getDefaultPort, getHostName, getPassword, getPort, getUserName
-
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileName
checkName, compareTo, createURI, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, toString
-
-
-
-
Method Detail
-
getShare
public java.lang.String getShare()
Returns the share name.
-
appendRootUri
protected void appendRootUri(java.lang.StringBuffer buffer, boolean addPassword)
Builds the root URI for this file name.- Overrides:
appendRootUri
in classorg.apache.commons.vfs.provider.GenericFileName
-
appendCredentials
protected void appendCredentials(java.lang.StringBuffer buffer, boolean addPassword)
put domain before username if both are set- Overrides:
appendCredentials
in classorg.apache.commons.vfs.provider.GenericFileName
-
createName
public org.apache.commons.vfs.FileName createName(java.lang.String path, org.apache.commons.vfs.FileType type)
Factory method for creating name instances.- Overrides:
createName
in classorg.apache.commons.vfs.provider.GenericFileName
-
getUriWithoutAuth
public java.lang.String getUriWithoutAuth() throws org.apache.commons.vfs.FileSystemException
Construct the path suitable for SmbFile when used with NtlmPasswordAuthentication- Throws:
org.apache.commons.vfs.FileSystemException
-
getDomain
public java.lang.String getDomain()
returns the domain name
-
-