commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shifman <mark.shif...@yale.edu>
Subject Re: [VFS] reading a file from a tgz archive on an sftp server
Date Tue, 23 Aug 2005 17:31:51 GMT
Mario Ivankovits wrote:

> Hi!
>
>> FileObject fo_test=  fsManager.resolveFile( 
>> "sftp://myname:mypasswd@myhost/pathtofile/myfile.tgz")
>>
>> but I don't know how to read a file in this object or make the 
>> fileobject into something with children.
>
> please try
> FileObject fo_test=  fsManager.resolveFile( 
> "tgz:sftp://myname:mypasswd@myhost/pathtofile/myfile.tgz!")
>
It threw the following.
org.apache.commons.vfs.FileSystemException: Badly formed URI 
"tgz:sftp://myname:mypasswd@myhost/pathtofle/myfile.tgz!".
    at 
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:85)
    at 
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:532)
    at 
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:486)
    at 
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:456)
    at org.ycmi.itraq.itraq_calc.main(itraq_calc.java:117)
Caused by: java.net.MalformedURLException: unknown protocol: tgz
    at java.net.URL.<init>(URL.java:544)
    at java.net.URL.<init>(URL.java:434)
    at java.net.URL.<init>(URL.java:383)
    at 
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:66)
    ... 4 more

> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message