Class URLFileNameParser
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileNameParser
org.apache.commons.vfs.provider.HostFileNameParser
org.apache.commons.vfs.provider.URLFileNameParser
- All Implemented Interfaces:
FileNameParser
- Direct Known Subclasses:
HttpFileNameParser, HttpsFileNameParser, SftpFileNameParser
Implementation for any url based filesystem.
Parses the url into user/password/host/port/path/queryString
Parses the url into user/password/host/port/path/queryString
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- imario@apache.org
-
Nested Class Summary
Nested classes/interfaces inherited from class HostFileNameParser
HostFileNameParser.Authority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanencodeCharacter(char ch) Check if a character needs encoding (%nn)parseUri(VfsComponentContext context, FileName base, String filename) parses a String into a filenameMethods inherited from class HostFileNameParser
extractHostName, extractPort, extractToPath, extractUserInfo, getDefaultPort
-
Constructor Details
-
URLFileNameParser
public URLFileNameParser(int defaultPort)
-
-
Method Details
-
encodeCharacter
public boolean encodeCharacter(char ch) Description copied from interface:FileNameParserCheck if a character needs encoding (%nn)- Specified by:
encodeCharacterin interfaceFileNameParser- Overrides:
encodeCharacterin classHostFileNameParser- Parameters:
ch- the character- Returns:
- true if character should be encoded
-
parseUri
public FileName parseUri(VfsComponentContext context, FileName base, String filename) throws FileSystemException Description copied from interface:FileNameParserparses a String into a filename- Specified by:
parseUriin interfaceFileNameParser- Overrides:
parseUriin classHostFileNameParser- Parameters:
base-filename-- Throws:
FileSystemException
-