Package org.apache.commons.vfs2.provider
Class GenericURLFileNameParser
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileNameParser
org.apache.commons.vfs2.provider.HostFileNameParser
org.apache.commons.vfs2.provider.GenericURLFileNameParser
- All Implemented Interfaces:
- FileNameParser
- Direct Known Subclasses:
- Http4FileNameParser,- Http4sFileNameParser,- Http5FileNameParser,- Http5sFileNameParser
Generic implementation for any URL based file system, without depending on a specific library.
 
Parses the URL into user/password/host/port/path/queryString.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.vfs2.provider.HostFileNameParserHostFileNameParser.Authority
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanencodeCharacter(char ch) Check if a character needs encoding (%nn).parseUri(VfsComponentContext context, FileName base, String fileName) Parses a String into a file name.Methods inherited from class org.apache.commons.vfs2.provider.HostFileNameParserextractHostName, extractPort, extractToPath, extractToPath, extractUserInfo, getDefaultPort
- 
Constructor Details- 
GenericURLFileNameParserConstructs a new instance.- Parameters:
- defaultPort- The default port.
 
 
- 
- 
Method Details- 
encodeCharacterDescription copied from interface:FileNameParserCheck if a character needs encoding (%nn).- Specified by:
- encodeCharacterin interface- FileNameParser
- Overrides:
- encodeCharacterin class- AbstractFileNameParser
- Parameters:
- ch- the character
- Returns:
- true if character should be encoded
 
- 
parseUripublic FileName parseUri(VfsComponentContext context, FileName base, String fileName) throws FileSystemException Description copied from interface:FileNameParserParses a String into a file name.- Specified by:
- parseUriin interface- FileNameParser
- Overrides:
- parseUriin class- HostFileNameParser
- 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.
 
 
-