Package org.apache.commons.vfs.provider
Class LayeredFileNameParser
- java.lang.Object
-
- org.apache.commons.vfs.provider.AbstractFileNameParser
-
- org.apache.commons.vfs.provider.LayeredFileNameParser
-
- All Implemented Interfaces:
FileNameParser
public class LayeredFileNameParser extends AbstractFileNameParser
Implementation for layered filesystems. Additionally encodes the '!' character.
-
-
Constructor Summary
Constructors Constructor Description LayeredFileNameParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanencodeCharacter(char ch)Check if a character needs encoding (%nn)protected java.lang.StringextractRootName(java.lang.StringBuffer uri)Pops the root prefix off a URI, which has had the scheme removed.static LayeredFileNameParsergetInstance()FileNameparseUri(VfsComponentContext context, FileName base, java.lang.String filename)parses a String into a filename
-
-
-
Method Detail
-
getInstance
public static LayeredFileNameParser getInstance()
-
encodeCharacter
public boolean encodeCharacter(char ch)
Description copied from interface:FileNameParserCheck if a character needs encoding (%nn)- Specified by:
encodeCharacterin interfaceFileNameParser- Overrides:
encodeCharacterin classAbstractFileNameParser- Parameters:
ch- the character- Returns:
- true if character should be encoded
-
parseUri
public FileName parseUri(VfsComponentContext context, FileName base, java.lang.String filename) throws FileSystemException
Description copied from interface:FileNameParserparses a String into a filename- Throws:
FileSystemException
-
extractRootName
protected java.lang.String extractRootName(java.lang.StringBuffer uri) throws FileSystemExceptionPops the root prefix off a URI, which has had the scheme removed.- Throws:
FileSystemException
-
-