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

java.lang.Object
  extended byorg.apache.commons.vfs.provider.AbstractFileName
      extended byorg.apache.commons.vfs.provider.GenericFileName
          extended byorg.apache.commons.vfs.provider.smb.SmbFileName
All Implemented Interfaces:
Comparable, FileName

public class SmbFileName
extends GenericFileName

An SMB URI. Adds a share name to the generic URI.

Version:
$Revision: 215932 $ $Date: 2005-07-12 09:08:07 +0200 (Tue, 12 Jul 2005) $
Author:
Adam Murdoch

Field Summary
 
Fields inherited from interface org.apache.commons.vfs.FileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR
 
Constructor Summary
protected SmbFileName(String scheme, String hostName, int port, String userName, String password, String domain, String share, String path)
           
 
Method Summary
protected  void appendCredentials(StringBuffer buffer)
          put domain before username if both are set
protected  void appendRootUri(StringBuffer buffer)
          Builds the root URI for this file name.
 FileName createName(String path)
          Factory method for creating name instances.
 String getDomain()
          returns the domain name
 String getShare()
          Returns the share name.
 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, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getURI, 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(String scheme,
                      String hostName,
                      int port,
                      String userName,
                      String password,
                      String domain,
                      String share,
                      String path)
Method Detail

getShare

public String getShare()
Returns the share name.


appendRootUri

protected void appendRootUri(StringBuffer buffer)
Builds the root URI for this file name.

Overrides:
appendRootUri in class GenericFileName

appendCredentials

protected void appendCredentials(StringBuffer buffer)
put domain before username if both are set

Overrides:
appendCredentials in class GenericFileName

createName

public FileName createName(String path)
Factory method for creating name instances.

Overrides:
createName in class GenericFileName

getUriWithoutAuth

public String getUriWithoutAuth()
                         throws FileSystemException
Construct the path suitable for SmbFile when used with NtlmPasswordAuthentication

Throws:
FileSystemException

getDomain

public String getDomain()
returns the domain name



Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.