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:
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

    Constructors
    Modifier
    Constructor
    Description
    protected
    SmbFileName(String scheme, String hostName, int port, String userName, String password, String domain, String share, String path, org.apache.commons.vfs.FileType type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    appendCredentials(StringBuffer buffer, boolean addPassword)
    put domain before username if both are set
    protected void
    appendRootUri(StringBuffer buffer, boolean addPassword)
    Builds the root URI for this file name.
    org.apache.commons.vfs.FileName
    createName(String path, org.apache.commons.vfs.FileType type)
    Factory method for creating name instances.
    returns the domain name
    Returns the share name.
    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 Details

  • Method Details

    • getShare

      public String getShare()
      Returns the share name.
    • appendRootUri

      protected void appendRootUri(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(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(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 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 String getDomain()
      returns the domain name