org.apache.commons.vfs.provider.local
Class LocalFileNameParser
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileNameParser
org.apache.commons.vfs.provider.local.LocalFileNameParser
- All Implemented Interfaces:
- FileNameParser
- Direct Known Subclasses:
- GenericFileNameParser, WindowsFileNameParser
public abstract class LocalFileNameParser
- extends AbstractFileNameParser
A name parser.
- Version:
- $Revision: 764356 $ $Date: 2009-04-13 06:06:01 +0200 (Mo, 13. Apr 2009) $
- Author:
- Adam Murdoch
Method Summary |
protected abstract FileName |
createFileName(java.lang.String scheme,
java.lang.String rootFile,
java.lang.String path,
FileType type)
|
protected abstract java.lang.String |
extractRootPrefix(java.lang.String uri,
java.lang.StringBuffer name)
Pops the root prefix off a URI, which has had the scheme removed. |
boolean |
isAbsoluteName(java.lang.String name)
Determines if a name is an absolute file name. |
FileName |
parseUri(VfsComponentContext context,
FileName base,
java.lang.String filename)
parses a String into a filename. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalFileNameParser
public LocalFileNameParser()
isAbsoluteName
public boolean isAbsoluteName(java.lang.String name)
- Determines if a name is an absolute file name.
extractRootPrefix
protected abstract java.lang.String extractRootPrefix(java.lang.String uri,
java.lang.StringBuffer name)
throws FileSystemException
- Pops the root prefix off a URI, which has had the scheme removed.
- Throws:
FileSystemException
parseUri
public FileName parseUri(VfsComponentContext context,
FileName base,
java.lang.String filename)
throws FileSystemException
- Description copied from interface:
FileNameParser
- parses a String into a filename.
- Parameters:
context
- The component context.base
- The base FileName.filename
- The target file name.
- Returns:
- A FileName that represents the taret file.
- Throws:
FileSystemException
- if an error occurs parsing the URI.
createFileName
protected abstract FileName createFileName(java.lang.String scheme,
java.lang.String rootFile,
java.lang.String path,
FileType type)
Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.