Class LocalFileNameParser
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileNameParser
org.apache.commons.vfs2.provider.local.LocalFileNameParser
- All Implemented Interfaces:
- FileNameParser
- Direct Known Subclasses:
- GenericFileNameParser,- WindowsFileNameParser
A name parser.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract FileNamecreateFileName(String scheme, String rootFile, String path, FileType fileType) Creates a FileName.protected abstract StringextractRootPrefix(String uri, StringBuilder name) Pops the root prefix off a URI, which has had the scheme removed.booleanisAbsoluteName(String name) Determines if a name is an absolute file name.parseUri(VfsComponentContext context, FileName base, String uri) Parses a String into a file name.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileNameParserencodeCharacter
- 
Constructor Details- 
LocalFileNameParserpublic LocalFileNameParser()Constructs a new instance.
 
- 
- 
Method Details- 
createFileNameprotected abstract FileName createFileName(String scheme, String rootFile, String path, FileType fileType) Creates a FileName.- Parameters:
- scheme- The scheme.
- rootFile- the root file.
- path- the path.
- fileType- the file type.
- Returns:
- a FileName.
 
- 
extractRootPrefixprotected abstract String extractRootPrefix(String uri, StringBuilder name) throws FileSystemException Pops the root prefix off a URI, which has had the scheme removed.- Parameters:
- uri- the whole URI for error reporting.
- name- the URI to modify.
- Returns:
- the root prefix extracted.
- Throws:
- FileSystemException- if an error occurs.
 
- 
isAbsoluteNameDetermines if a name is an absolute file name.- Parameters:
- name- The file name.
- Returns:
- true if the name is absolute, false otherwise.
 
- 
parseUripublic FileName parseUri(VfsComponentContext context, FileName base, String uri) throws FileSystemException Description copied from interface:FileNameParserParses a String into a file name.- Parameters:
- context- The component context.
- base- The base FileName.
- uri- The target file name.
- Returns:
- A FileName that represents the taret file.
- Throws:
- FileSystemException- if an error occurs parsing the URI.
 
 
-