[
https://issues.apache.org/jira/browse/CODEC-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory closed CODEC-224.
------------------------------
Resolution: Fixed
In svn trunk.
> Add convenience API
> org.apache.commons.codec.binary.Hex.encodeHexString(byte[]|ByteBuffer,
> boolean)
> ---------------------------------------------------------------------------------------------------
>
> Key: CODEC-224
> URL: https://issues.apache.org/jira/browse/CODEC-224
> Project: Commons Codec
> Issue Type: Improvement
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Fix For: 1.11
>
>
> Add convenience APIs:
> {{org.apache.commons.codec.binary.Hex.encodeHexString(byte[], boolean)}}:
> {code:java}
> /**
> * Converts an array of bytes into a String representing the hexadecimal
> values of each byte in order. The returned
> * String will be double the length of the passed array, as it takes two
> characters to represent any given byte.
> *
> * @param data
> * a byte[] to convert to Hex characters
> * @param toLowerCase
> * <code>true</code> converts to lowercase, <code>false</code>
> to uppercase
> * @return A String containing lower-case hexadecimal characters
> * @since 1.11
> */
> public static String encodeHexString(final byte[] data, boolean
> toLowerCase)
> {code}
> {{org.apache.commons.codec.binary.Hex.encodeHexString(ByteBuffer, boolean)}}:
> {code:java}
> /**
> * Converts a byte buffer into a String representing the hexadecimal
> values of each byte in order. The returned
> * String will be double the length of the passed array, as it takes two
> characters to represent any given byte.
> *
> * @param data
> * a byte buffer to convert to Hex characters
> * @param toLowerCase
> * <code>true</code> converts to lowercase, <code>false</code>
> to uppercase
> * @return A String containing lower-case hexadecimal characters
> * @since 1.11
> */
> public static String encodeHexString(final ByteBuffer data, boolean
> toLowerCase)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)