commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <>
Subject RE: [codec] StatefulDecoders
Date Tue, 24 Feb 2004 02:13:27 GMT
> > I've been working on the idea of stateful Decoders designed for use with
> > non-blocking reads where buffers are read from channels and used by
> > decoders.
> >

> How does your proposal contrast/differs/combines with what has
> been referred to on this list as "streamable" codecs?
> See

The streamable decoders have an interface like:

  public void operation(InputStream in, OutputStream out)
     throws Exception;

which means that the calling thread is going to be blocked on I/O, whereas
Alex's proposed interface is:

  public java.util.List operation(java.nio.ByteBuffer buffer);

which is called as data arrives.  The difference is pull-model (blocking
I/O) vs push-model (non-blocking I/O).

	--- Noel

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

View raw message