commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher (siege) "OBrien <>
Subject [IO] CallbackOutputStream (sort-of a proposal)
Date Thu, 24 Apr 2003 21:02:31 GMT


I've been working on a set of classes which might have a place within
commons (in io, probably). I'm just looking for feedback on the idea
before I write more than the simple implementation I've got thus far.

I've got what looks like an output stream, created with a fixed-size
internal buffer, and a slot for a listener. The listener implements an
interface I'm calling ByteSequenceProcessor, and has a  public method
process(ByteSequence):void. ByteSequence is very similar to
CharSequence, except it's an interface and (you guessed it) based on

The point behind this mess is to allow input to be passed into the
stream, and the stream will automatically trigger the sequence processor
when necessary, passing ByteSequences of the correct size. It eliminates
the necessity for duplicate chunking code.

I wrote this as part of an MD5 implementation for codec (hopefully for
codec) a little while ago. I'd appreciate any feedback on the idea and
its (possible lack of) merit.


Christopher (siege) O'Brien <>

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

View raw message