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
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
-
Field Summary
Fields inherited from interface FileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendCredentials(StringBuffer buffer, boolean addPassword) append the user credentialsprotected voidappendRootUri(StringBuffer buffer, boolean addPassword) Builds the root URI for this file name.createName(String absPath, FileType type) Factory method for creating name instances.intReturns the default port for this file name.Returns the host name part of this name.Returns the password part of this name.intgetPort()Returns the port part of this name.Returns the user name part of this name.Methods inherited from class AbstractFileName
checkName, compareTo, createURI, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, toString
-
Constructor Details
-
GenericFileName
-
-
Method Details
-
getUserName
Returns the user name part of this name. -
getPassword
Returns the password part of this name. -
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
Description copied from class:AbstractFileNameFactory method for creating name instances.- Specified by:
createNamein classAbstractFileName
-
appendRootUri
Builds the root URI for this file name.- Specified by:
appendRootUriin classAbstractFileName
-
appendCredentials
append the user credentials
-