commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitaliy S" <runa...@gmail.com>
Subject Re: I wrote several methods for IOCommons FileUtil. How can I donate it to IOCommons?
Date Mon, 19 Jun 2006 09:12:54 GMT
>>but AFAIK zip and jar share the same compression algorithm anyway.
> The algorithms are similar but not the same.
>Educated me ...Jar*putStream extends Zip*putStream and I have never
come across a jar I could not unzip with the usual zip command.

The JarEntry and ZipEntry treat non ASCII symbols different.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244499 for details
(unfortunatly it is the only plase I found it explained).

re:Getting from File to FileInputStream is easy and no reason to add
compression algorithms to IO.

I want to compress file (or dir). I get file on input and file(or byte[]) on
output. I can't understand why it should't be placed to IO.
If you look throw the code it works with IO packeges most of the time.
Also I don't think it was good idea to seporate compress from IO. ;-)

to me it is same as example with PrintWriter

what aproach do you prefer
this one
FileWriter fout = new FileWriter("fred.txt");
BufferedWriter bout = new BufferedWriter(fout);
PrintWriter pout = new PrintWriter(bout);
or that one
PrintWriter pout = new PrintWriter("fred.txt");

I prefer the second variant.
-- 
Regards,
Vitaliy S

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message