commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <ma...@phreaker.net>
Subject Re: [io] docs and refactorings
Date Sun, 28 Dec 2003 22:51:57 GMT
Stephen Colebourne wrote:
>>OK, then perhaps io.streams is the best place.  However, I believe that
>>Henri preferred leaving the classes split between io.input and
>>io.output.  Henri, can you chime in and give us the reason for your
>>opinion on this again?
> 
> I also support input and output (as is), as they just seem like an obvious
> classification. Is there any real need for them to be together?
> [collections] has suffered by putting things in one place when they should
> have been split.

There are 3 examples in the current [io] codebase:

Counting [InputStream, OutputStream]
Demux [InputStream, OutputStream]
Proxy [InputStream, OutputStream]

I think that these classes belong in the same package.  With regard to 
streams and readers/writers, I disagree that input and output is an 
obvious classification.  There are many situations, although we only 
have three in [io] where the concept (or "type" of stream) is the 
controlling factor.  These classes make use of the same concept, and 
therefore may make use of similar code and tests.

Take a look at java.io:

Buffered [InputStream, OutputStream, Reader, Writer]
ByteArray [InputStream, OutputStream]
CharArray [Reader, Writer]
Data [InputStream, OutputStream]
File [InputStream, OutputStream]
Filter [InputStream, OutputStream, Reader, Writer]
LineNumber [InputStream, Reader]
Object [InputStream, OutputStream]
Piped [InputStream, OutputStream, Reader, Writer]
Pushback [InputStream, Reader]

Should these classes all be separated by input and output?  I don't 
think so.


---------------------------------------------------------------------
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