You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <gg...@seagullsw.com> on 2004/02/24 02:37:56 UTC

[codec] DecoderException superclass [WAS: StatefulDecoders]

The question is:

What class should DecoderException and EncoderException subclass?

Right now, they both subclass Exception. 

Alex suggests below that IOException would also make sense.

Opinions?

Gary

> -----Original Message-----
> From: Alex Karasulu [mailto:aok123@bellsouth.net]
> Sent: Friday, February 20, 2004 23:13
> To: commons-dev@jakarta.apache.org
> Cc: 'Apache Directory Developers List'
> Subject: [codec] StatefulDecoders
> 
> Hi,
> 
> 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.  As you know you don't always get the complete PDU in a single
> channel read and so buffers need to be handled in a decoding session.
> 
> This JIRA issue contains attachments explaining the new interface:
> 
> http://nagoya.apache.org/jira/secure/ViewIssue.jspa?id=13599
> 
> First I would like to figure out what the codec people think about this
> stateful decoder concept and then perhaps we can add the interfaces into
> the
> 
> codec for general use.
> 
> Also I'm wondering if we can make the DecoderException and the
> EncoderException extend the IOException reather than just Exception.
> Most of these operations are IO based and it makes sense to me to have the
> Exception derive from IOException.
> 
> Alex
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org

Re: [codec] DecoderException superclass [WAS: StatefulDecoders]

Posted by Tim O'Brien <to...@discursive.com>.
Gary Gregory wrote:
> Alex suggests below that IOException would also make sense.
> 
> Opinions?

I'm don't have strong feelings either way.  If EncoderException were to 
extend IOException, or if Encoders threw IOExceptions instead of 
EncoderException.  Encoder and Decoder were experiments, most people who 
use Codec instantiate an object like Base64 or Soundex directly.  If 
these interfaces and exceptions need to evolve, let's do it.

Tim


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org