commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [VFS] questions and suggestions
Date Wed, 11 May 2005 10:06:44 GMT
Philippe Poulard wrote:
>>> Anyway, in the original code, the IS is put in a byte[] ; isn't that 
>>> dangerous when dealing simultaneously with very large files ?
>> Why? Every "copy" has its own byte buffer.
> but here the buffer has the size of the file ; usually, one uses a 
> tiny buffer on which one perform read/write operation
Sorry, I didnt get it.
FileUtil.writeContent uses a small buffer (maybe too small) in its 
read/write loop.
Dont mix this up with FileUtil.getContent() as this will only used for 
the classloading stuff.

>>> Question : why not use parser ?
Ok, it might be possible, but then again is jdk 1.4 only.

> file:////path/to/current/dir/foo
You are right, according to the documentation it should be

I will look into it. If you find some time it would be nice to file a 
bug at

>>> Suggestion : adding a capability to deal with I/O services
>> Or implement your own (virtual) directory called "services"?
>> eg
>> xmldb://host/services/service_name?param=value&param=value
> I don't like this solution because :
> -it's a hack, I prefer more formal solutions ; the XML:DB spec offers 
> specific means to get a service, not arbitrary URIs
> -what happened if a real directory called "services" already exists ?
You could also use a special scheme for this purpose, say: 

> and this one is a really good idea ; anyway I still think that this 
> interface could be part of VFS (with Capability.SERVICE)
I am not sure if this is really something which should be in VFS core, 
or maybe if havent understand it fully now.

What is the value of VFS if it only allows you to call a "service" on 
your filesystem and retrieve the result as a single object.

If I think on a JDBC stored procedure it isnt really easy to
1) call the method (you have datatypes)
2) interpret the result

Simply returning a object isnt what VFS would like to do. Its intention 
is to provide a view on the filesystem.

Now it might make sense if you have a JDBC FileSystem and the server 
provides a stored procedure to create a alternate view on it, but then 
the result of this "service" needs to be in a
form that VFS ist able to project to a hierarchical structure and the 
leaf can be retrieved using getAttributes and/or getInputStream.
In the case of a JDBC FileSystem the result might be a ResultSet.

But feel free to teach me :-)

>>> Question : I didn't found in the todo list something that looks like 
>>> a synchronized copy ; is there an obvious implementation or nobody 
>>> ever thought about it ?
There exists a ant-task called "org.apache.commons.vfs.tasks.SyncTask". 
Not sure, maybe some refactoring needs to be done to use it standalone 
(without ant).

>>> Misc : I've seen in the Todo list : "Add more selectors: XPath"
Do you plan to contribute it?


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

View raw message