[ 
https://issues.apache.org/jira/browse/CODEC-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16075045#comment-16075045
 ] 

ASF GitHub Bot commented on CODEC-224:
--------------------------------------

Github user sesuncedu closed the pull request at:

    https://github.com/apache/commons-codec/pull/7


> 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.4.14#64029)

Reply via email to