commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Delsaux <>
Subject [VFS][SFTP] access path containing %0
Date Tue, 14 Sep 2010 13:50:51 GMT
Hi all,
I'm trying to access through SFTP and Commons VFS a file in a path
containing the %0 sequence (as an example
but each time I do an exception occurs.
More precisely, I can open a FileObject on my SFTP server by doing so :
               FileSystemManager fsManager = VFS.getManager();
               String urlText = "sftp://" + main.sshUsername + ":"
                               + main.sshPassword + "@" +
main.serverAddress + "/";
               FileObject file = fsManager.resolveFile(urlText);

But when i try to resolve the
path, I get the following exception :

Exception in thread "main" org.apache.commons.vfs.FileSystemException:
Invalid URI escape sequence "%0/".
       at org.apache.commons.vfs.provider.UriParser.canonicalizePath(
       at org.apache.commons.vfs.provider.URLFileNameParser.parseUri(
       at org.apache.commons.vfs.provider.AbstractFileProvider.parseUri(
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveName(
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveName(
       at org.apache.commons.vfs.provider.AbstractFileObject.resolveFile(

Is there some kind of encoding I could use, as my path really exists
as this on that server ?


Nicolas Delsaux

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message