You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Bernd Eckenfels <ec...@zusammenkunft.net> on 2014/04/04 20:05:31 UTC

[CODEC] char[] decoding base64 variant

Hello,

with great delight I have seen that Java8 Base64 (JEP135) decoder
offers a method for decoding with String argument, but it does not
funtion as a Writer().

There is a quite common case that you want to decode base64 encoded
data in char[] chunks. With a OutputStream implementation one would
need to convert them to byte[] and with a decode(String) method one
would have to produce strings. It would be good if I could directly
have a "Writer Base64DecodeWriter(OutputStream)".

What do you think, is that a good addition to commons codec?

Bernd

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


Re: [CODEC] char[] decoding base64 variant

Posted by Gary Gregory <ga...@gmail.com>.
Well, what we have now is
org.apache.commons.codec.binary.Base64OutputStream and Base64InputStream.

Feel free to create a patch with unit tests and attach it to a new Jira
ticket.

We'll be better able to tell what it is you are trying to do...

Gary


On Fri, Apr 4, 2014 at 2:05 PM, Bernd Eckenfels <ec...@zusammenkunft.net>wrote:

> Hello,
>
> with great delight I have seen that Java8 Base64 (JEP135) decoder
> offers a method for decoding with String argument, but it does not
> funtion as a Writer().
>
> There is a quite common case that you want to decode base64 encoded
> data in char[] chunks. With a OutputStream implementation one would
> need to convert them to byte[] and with a decode(String) method one
> would have to produce strings. It would be good if I could directly
> have a "Writer Base64DecodeWriter(OutputStream)".
>
> What do you think, is that a good addition to commons codec?
>
> Bernd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory