org.apache.commons.vfs.provider
Class URLFileNameParser

java.lang.Object
  extended byorg.apache.commons.vfs.provider.AbstractFileNameParser
      extended byorg.apache.commons.vfs.provider.HostFileNameParser
          extended byorg.apache.commons.vfs.provider.URLFileNameParser
All Implemented Interfaces:
FileNameParser
Direct Known Subclasses:
HttpFileNameParser, HttpsFileNameParser, SftpFileNameParser

public class URLFileNameParser
extends HostFileNameParser

Implementation for any url based filesystem.
Parses the url into user/password/host/port/path/queryString

Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
imario@apache.org

Nested Class Summary
 
Nested classes inherited from class org.apache.commons.vfs.provider.HostFileNameParser
HostFileNameParser.Authority
 
Constructor Summary
URLFileNameParser(int defaultPort)
           
 
Method Summary
 boolean encodeCharacter(char ch)
          Check if a character needs encoding (%nn)
 FileName parseUri(VfsComponentContext context, FileName base, String filename)
          parses a String into a filename
 
Methods inherited from class org.apache.commons.vfs.provider.HostFileNameParser
extractHostName, extractPort, extractToPath, extractUserInfo, getDefaultPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLFileNameParser

public URLFileNameParser(int defaultPort)
Method Detail

encodeCharacter

public boolean encodeCharacter(char ch)
Description copied from interface: FileNameParser
Check if a character needs encoding (%nn)

Specified by:
encodeCharacter in interface FileNameParser
Overrides:
encodeCharacter in class HostFileNameParser

parseUri

public FileName parseUri(VfsComponentContext context,
                         FileName base,
                         String filename)
                  throws FileSystemException
Description copied from interface: FileNameParser
parses a String into a filename

Specified by:
parseUri in interface FileNameParser
Overrides:
parseUri in class HostFileNameParser
Throws:
FileSystemException


Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.