Hi Emmanuel,

thanks for your comments below. They all make sense.

However, Thorsten and I currently develop a new and (hopefully) better
implementation
than that which is currently available. That implementation fixes some of
the issues you mentioned.
If you want to take a look at it, please check it out via GIT:
http://projects.grobmeier.de/compress-redesign.git/
Your comments and your help is highly appreciated.

However, unfortunatly I cannot fix this issues in the repository,
cause I have no commit access.

Best regards,
Chris.



On Tue, Jun 17, 2008 at 11:02 AM, Emmanuel Bourg <[EMAIL PROTECTED]> wrote:

> I looked a bit at commons compress, I'd like to make a couple suggestions:
>
> - FileOutputStream and FileInputStream are used in several method
> signatures, but a simple OutputStream or InputStream would do the job. It's
> limiting the API to files only for no apparent reason.
>
> - I believe it would make sense if the exception hierarchy extend
> IOException. It could simplify some exception handling in the code, for
> example in PackableObject instead of this:
>
>    public static PackableObject identifyByHeader(File file, List packables)
> throws PackableObjectException {
>        ...
>        try {
>            ...
>        } catch (FileNotFoundException e) {
>            throw new PackableObjectException("File not found", e);
>        } catch (IOException e) {
>            throw new PackableObjectException("Internal factory exception",
> e);
>        } finally {
>            try {
>                fis.close();
>            } catch (IOException e1) {
>                throw new PackableObjectException("Error while closing
> InputStream to file", e1);
>            }
>        }
>    }
>
>
> we could have this:
>
>
>    public static PackableObject identifyByHeader(File file, List packables)
> throws IOException {
>        ...
>        try {
>            ...
>        } finally {
>            fis.close();
>        }
>    }
>
>
> Any objection to change this ?
>
> Emmanuel Bourg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to