org.apache.commons.vfs.provider
Class LayeredFileNameParser

java.lang.Object
  extended byorg.apache.commons.vfs.provider.AbstractFileNameParser
      extended byorg.apache.commons.vfs.provider.LayeredFileNameParser
All Implemented Interfaces:
FileNameParser

public class LayeredFileNameParser
extends AbstractFileNameParser

Implementation for layered filesystems.

Additionally encodes the '!' character.


Constructor Summary
LayeredFileNameParser()
           
 
Method Summary
 boolean encodeCharacter(char ch)
          Check if a character needs encoding (%nn)
protected  String extractRootName(StringBuffer uri)
          Pops the root prefix off a URI, which has had the scheme removed.
static LayeredFileNameParser getInstance()
           
 FileName parseUri(VfsComponentContext context, FileName base, 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

LayeredFileNameParser

public LayeredFileNameParser()
Method Detail

getInstance

public static LayeredFileNameParser getInstance()

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 AbstractFileNameParser

parseUri

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

Parameters:
base -
filename -
Throws:
FileSystemException

extractRootName

protected String extractRootName(StringBuffer uri)
                          throws FileSystemException
Pops the root prefix off a URI, which has had the scheme removed.

Throws:
FileSystemException


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