Class GenericFileName

java.lang.Object
org.apache.commons.vfs.provider.AbstractFileName
org.apache.commons.vfs.provider.GenericFileName
All Implemented Interfaces:
Comparable, FileName
Direct Known Subclasses:
URLFileName

public class GenericFileName extends AbstractFileName
A file name that represents a 'generic' URI, as per RFC 2396. Consists of a scheme, userinfo (typically username and password), hostname, port, and path.
Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
Author:
Adam Murdoch
  • Constructor Details

  • Method Details

    • getUserName

      public String getUserName()
      Returns the user name part of this name.
    • getPassword

      public String getPassword()
      Returns the password part of this name.
    • getHostName

      public String getHostName()
      Returns the host name part of this name.
    • getPort

      public int getPort()
      Returns the port part of this name.
    • getDefaultPort

      public int getDefaultPort()
      Returns the default port for this file name.
    • createName

      public FileName createName(String absPath, FileType type)
      Description copied from class: AbstractFileName
      Factory method for creating name instances.
      Specified by:
      createName in class AbstractFileName
    • appendRootUri

      protected void appendRootUri(StringBuffer buffer, boolean addPassword)
      Builds the root URI for this file name.
      Specified by:
      appendRootUri in class AbstractFileName
    • appendCredentials

      protected void appendCredentials(StringBuffer buffer, boolean addPassword)
      append the user credentials