Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
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.