Class ResourceFileNameParser
- java.lang.Object
-
- org.apache.commons.vfs2.provider.AbstractFileNameParser
-
- org.apache.commons.vfs2.provider.local.LocalFileNameParser
-
- org.apache.commons.vfs2.provider.local.GenericFileNameParser
-
- org.apache.commons.vfs2.provider.res.ResourceFileNameParser
-
- All Implemented Interfaces:
FileNameParser
public class ResourceFileNameParser extends GenericFileNameParser
Slightly modified filename parser for resource URIs.
-
-
Field Summary
Fields Modifier and Type Field Description private static ResourceFileNameParser
INSTANCE
-
Constructor Summary
Constructors Constructor Description ResourceFileNameParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileName
createFileName(java.lang.String scheme, java.lang.String rootFile, java.lang.String path, FileType type)
protected java.lang.String
extractRootPrefix(java.lang.String uri, java.lang.StringBuilder name)
Extracts the root prefix from a URI string, which has had the scheme removed.static GenericFileNameParser
getInstance()
retrieve a instance to this parser.-
Methods inherited from class org.apache.commons.vfs2.provider.local.LocalFileNameParser
isAbsoluteName, parseUri
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileNameParser
encodeCharacter
-
-
-
-
Field Detail
-
INSTANCE
private static final ResourceFileNameParser INSTANCE
-
-
Method Detail
-
getInstance
public static GenericFileNameParser getInstance()
retrieve a instance to this parser.- Returns:
- the parser
-
extractRootPrefix
protected java.lang.String extractRootPrefix(java.lang.String uri, java.lang.StringBuilder name) throws FileSystemException
Description copied from class:GenericFileNameParser
Extracts the root prefix from a URI string, which has had the scheme removed.- Overrides:
extractRootPrefix
in classGenericFileNameParser
- Parameters:
uri
- the whole URI for error reporting.name
- the URI to modify.- Returns:
- the root prefix extracted.
- Throws:
FileSystemException
- if an error occurs.
-
createFileName
protected FileName createFileName(java.lang.String scheme, java.lang.String rootFile, java.lang.String path, FileType type)
- Overrides:
createFileName
in classGenericFileNameParser
-
-