Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Add convenience APIs:
org.apache.commons.codec.binary.Hex.encodeHexString(byte[], boolean):
/** * 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)
org.apache.commons.codec.binary.Hex.encodeHexString(ByteBuffer, boolean):
/** * 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)
Attachments
Issue Links
- links to