Class GenericFileNameParser
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileNameParser
org.apache.commons.vfs2.provider.local.LocalFileNameParser
org.apache.commons.vfs2.provider.local.GenericFileNameParser
- All Implemented Interfaces:
FileNameParser
- Direct Known Subclasses:
ResourceFileNameParser
A general-purpose file name parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FileName
createFileName
(String scheme, String rootFile, String path, FileType type) Creates a FileName.protected String
extractRootPrefix
(String uri, StringBuilder name) Extracts the root prefix from a URI string, which has had the scheme removed.static GenericFileNameParser
Gets the singleton instance, never null.Methods inherited from class org.apache.commons.vfs2.provider.local.LocalFileNameParser
isAbsoluteName, parseUri
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileNameParser
encodeCharacter
-
Constructor Details
-
GenericFileNameParser
public GenericFileNameParser()Constructs a new instance.
-
-
Method Details
-
getInstance
Gets the singleton instance, never null.- Returns:
- the singleton instance.
-
createFileName
Description copied from class:LocalFileNameParser
Creates a FileName.- Specified by:
createFileName
in classLocalFileNameParser
- Parameters:
scheme
- The scheme.rootFile
- the root file.path
- the path.type
- the file type.- Returns:
- a FileName.
-
extractRootPrefix
Extracts the root prefix from a URI string, which has had the scheme removed.- Specified by:
extractRootPrefix
in classLocalFileNameParser
- Parameters:
uri
- the whole URI for error reporting.name
- the URI to modify.- Returns:
- the root prefix extracted.
- Throws:
FileSystemException
- if an error occurs.
-