commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remi Arntzen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CODEC-8) REQ: Streaming codecs
Date Sun, 27 Aug 2006 03:10:24 GMT
    [ http://issues.apache.org/jira/browse/CODEC-8?page=comments#action_12430816 ] 
            
Remi Arntzen commented on CODEC-8:
----------------------------------

I have nothing against the StreamingDecoder interface, however the Base64 implemented input
stream and output stream should be publicly accessible as well.  In this circumstance I would
implement each stream as a public inner class so that the Base64 streams would be initialized
via "new Base64.InputStream(...)" and "new Base64.OutputStream(...)" respectively, and the
simpler static utility methods could still be accessed as they are.

Should the output stream be capable of encoding and decoding, or just encoding?
Output streams are most often used for encoding and input streams for decoding data.

> REQ: Streaming codecs
> ---------------------
>
>                 Key: CODEC-8
>                 URL: http://issues.apache.org/jira/browse/CODEC-8
>             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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message