commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Wiedmann (JIRA)" <>
Subject [jira] Commented: (CODEC-8) REQ: Streaming codecs
Date Sun, 27 Aug 2006 13:33:25 GMT
    [ ] 
Jochen Wiedmann commented on CODEC-8:

I do not know the StreamingDecoder interface, but I would like to point out, that an Input-
or OutputStream interface isn't sufficiently generic.

Consider the following:

- There are cases, when you'd like to read base64 data from an InputStream().
- There are also cases, when you'd like to have an OutputStream, to which base64 data should
be written.
- Finally, there are cases when neither is satisfying. For example, consider a SAX filter.

The implementation in ws-common-utils is sufficiently generic to support all of the above
cases and in both directions.

> REQ: Streaming codecs
> ---------------------
>                 Key: CODEC-8
>                 URL:
>             Project: Commons Codec
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Operating System: All
> Platform: All
>            Reporter: Sergei S. Ivanov
> I would really appreciate if, for example, Base64 encoder could operate on
> streams. One reason is that it's much easier to attach ByteArrayInputStream to
> an array of bytes that to copy a byte array into a stream. The other reason is
> greater flexibility, given by the streams.
> I'd suggest creating a pair of new interfaces:
> public interface StreamingDecoder implements Decoder {
>   public void decode(InputStream in, OutputStream out) throws DecoderException;
> }
> public interface StreamingEncoder implements Encoder {
>   public void encode(InputStream in, OutputStream out) throws EncoderException;
> }
> Base64 and Hex will then be able to implement these interfaces.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message