org.apache.commons.vfs.provider.smb
Class SmbFileName

java.lang.Object
  extended by org.apache.commons.vfs.provider.AbstractFileName
      extended by org.apache.commons.vfs.provider.GenericFileName
          extended by 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

Field Summary
 
Fields inherited from interface org.apache.commons.vfs.FileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR
 
Constructor Summary
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
protected  void appendCredentials(java.lang.StringBuffer buffer, boolean addPassword)
          put domain before username if both are set
protected  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 name
 java.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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmbFileName

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 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 class org.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 class org.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 class org.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