commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CODEC-8) REQ: Streaming codecs
Date Thu, 19 Jun 2008 18:17:45 GMT

    [ https://issues.apache.org/jira/browse/CODEC-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606488#action_12606488
] 

Sebb commented on CODEC-8:
--------------------------

Also, the switch statement in decode() does not have any breaks in it - all the cases drop
thru.
If this is intentional - I assume it is - then perhaps this could be commented?

> REQ: Streaming codecs
> ---------------------
>
>                 Key: CODEC-8
>                 URL: https://issues.apache.org/jira/browse/CODEC-8
>             Project: Commons Codec
>          Issue Type: Improvement
>    Affects Versions: 1.2
>         Environment: Operating System: All
> Platform: All
>            Reporter: Sergei S. Ivanov
>             Fix For: 1.4
>
>         Attachments: Base64.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message