Uploaded image for project: 'Commons Codec'
  1. Commons Codec
  2. CODEC-8

REQ: Streaming codecs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.x
    • None
    • Operating System: All
      Platform: All

    • 19882

    Description

      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.

      Attachments

        1. Base64.diff
          25 kB
          Remi Arntzen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sergei_ivanov@mail.ru Sergei S. Ivanov
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: