You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Or Mark <or...@gmail.com> on 2019/09/28 05:21:28 UTC

[codec] Hex encode

Hello,

About commons-codec Hex encoding methods,
I suggest adding to Hex static encode method which returns byte[]
It will be consistent with other encoding classes that have such method as
Base64(same package) and MessageDigest.

I don't see a real reason to use instance method in this case.

I would like to contribute this method to library.

First asked in
https://stackoverflow.com/questions/58128819/apache-common-codec-why-hex-encode-isnt-static/58129148#58129148

Re: [codec] Hex encode

Posted by sebb <se...@gmail.com>.
On Sat, 28 Sep 2019 at 06:21, Or Mark <or...@gmail.com> wrote:
>
> Hello,
>
> About commons-codec Hex encoding methods,
> I suggest adding to Hex static encode method which returns byte[]
> It will be consistent with other encoding classes that have such method as
> Base64(same package) and MessageDigest.

Base64 has a static method, but this actually calls a method on a
cached instance using UTF-8.
The use of UTF-8 is noted in the Javadoc.

> I don't see a real reason to use instance method in this case.

It uses the instance Charset, as noted in the Javadoc.

> I would like to contribute this method to library.

What is the use case for this?

> First asked in
> https://stackoverflow.com/questions/58128819/apache-common-codec-why-hex-encode-isnt-static/58129148#58129148

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