|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.provider.AbstractFileNameParser
org.apache.commons.vfs.provider.url.UrlFileNameParser
public class UrlFileNameParser
Implementation for any java.net.url based filesystem.
Composite of URLFilenameParser and GenericFilenameParser
Constructor Summary | |
---|---|
UrlFileNameParser()
|
Method Summary | |
---|---|
protected int |
countSlashes(java.lang.String filename)
This method counts the slashes after the scheme. |
boolean |
encodeCharacter(char ch)
Check if a character needs encoding (%nn). |
protected boolean |
isUrlBased(FileName base,
java.lang.String filename)
Guess is the given filename is a url with host or not. |
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 |
Constructor Detail |
---|
public UrlFileNameParser()
Method Detail |
---|
public boolean encodeCharacter(char ch)
FileNameParser
encodeCharacter
in interface FileNameParser
encodeCharacter
in class AbstractFileNameParser
ch
- the character
public FileName parseUri(VfsComponentContext context, FileName base, java.lang.String filename) throws FileSystemException
FileNameParser
context
- The component context.base
- The base FileName.filename
- The target file name.
FileSystemException
- if an error occurs parsing the URI.protected boolean isUrlBased(FileName base, java.lang.String filename)
URLFileName
or there are only 2 slashes
after the scheme.
protected int countSlashes(java.lang.String filename)
filename
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |