commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [io] New StreamResolver interface.
Date Sun, 17 Dec 2006 22:12:17 GMT
I think that this overlaps with commons-vfs in terms of functionality. 
Have you seen that project?

Stephen


Bill Silvester wrote:
> Hi,
> 
> I've built and am using a StreamResolver interface which I find useful, 
> and wondered if anyone here would be interested in adding it to the 
> commons-io library.
> 
> The basic interface is pretty simple, and is intended to allow simple 
> access to input/output streams, without having to worry about the 
> mechanics of exactly where/what kind of stream they are.
> 
>    public interface StreamResolver {
>        public boolean exists(String path);
>        public InputStream openInputStream(String path);
>        public OutputStream openOutputStream(String path);
>        public String resolvePath(String path);
>    }
> 
> I've currently got the following implementations:
> 
>    FileStreamResolver - a basic resolver just using a file path.
>    ZipStreamResolver - uses base resolver to access a zip file, and 
> provides access to files within the archive.
>    ServletStreamResolver - based on a ServletContext, using 
> getResourceAsStream() internally.
> 
> If anyone wants to checkout my current implementation, you can currently 
> find it at http://bsxl.com/tmp/stream-resolver.tgz.
> 
> If anyone is interested in this, I'll be happy to format it as per the 
> guidelines, and contribute it to the project.
> 
> Cheers,
> 
> Bill
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 

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


Mime
View raw message