Class ResourceFileName
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileName
org.apache.commons.vfs2.provider.res.ResourceFileName
- All Implemented Interfaces:
Comparable<FileName>
,FileName
A resource file URI.
-
Field Summary
Fields inherited from interface org.apache.commons.vfs2.FileName
EMPTY_ARRAY, ROOT_PATH, SEPARATOR, SEPARATOR_CHAR
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ResourceFileName
(String scheme, String path, FileType type) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendRootUri
(StringBuilder buffer, boolean addPassword) Builds the root URI for this file name.createName
(String path, FileType type) Factory method for creating name instances.Returns the root URI of the file system this file belongs to.toString()
Returns the decoded URI of the file.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileName
checkName, compareTo, createURI, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, isFile
-
Constructor Details
-
ResourceFileName
Constructs a new instance.- Parameters:
scheme
- The scheme.path
- the absolute path, maybe empty or null.type
- the file type.
-
-
Method Details
-
appendRootUri
Builds the root URI for this file name.- Specified by:
appendRootUri
in classAbstractFileName
- Parameters:
buffer
- A StringBuilder to use to construct the URI.addPassword
- true if the password should be added, false otherwise.
-
createName
Factory method for creating name instances.- Specified by:
createName
in classAbstractFileName
- Parameters:
path
- The file path.type
- The file type.- Returns:
- The FileName.
-
getRootURI
Description copied from class:AbstractFileName
Returns the root URI of the file system this file belongs to.- Specified by:
getRootURI
in interfaceFileName
- Overrides:
getRootURI
in classAbstractFileName
- Returns:
- The URI of the root.
-
toString
Returns the decoded URI of the file.- Overrides:
toString
in classAbstractFileName
- Returns:
- the FileName as a URI.
-