Class ApachePatch.Hex
java.lang.Object
com.easypost.utils.ApachePatch.Hex
- Enclosing class:
ApachePatch
This class was lifted and modified from
common-codec:common-codec version 1.15,
namespace org.apache.commons.codec.binary.Hex,
released under the Apache License 2.0.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic char[]
encodeHex
(byte[] data) Encode a byte array into a hex char array.static char[]
encodeHex
(byte[] data, boolean toLowerCase) Encode a byte array into a hex char array.protected static char[]
encodeHex
(byte[] data, char[] toDigits) Encode a byte array into a hex char array.
-
Constructor Details
-
Hex
public Hex()
-
-
Method Details
-
encodeHex
public static char[] encodeHex(byte[] data) Encode a byte array into a hex char array.- Parameters:
data
- the byte array to encode- Returns:
- the hex encoded char array
-
encodeHex
public static char[] encodeHex(byte[] data, boolean toLowerCase) Encode a byte array into a hex char array.- Parameters:
data
- the byte array to encodetoLowerCase
-true
converts to lowercase,false
to uppercase- Returns:
- the hex encoded char array
-
encodeHex
protected static char[] encodeHex(byte[] data, char[] toDigits) Encode a byte array into a hex char array.- Parameters:
data
- the byte array to encodetoDigits
- map of elements to convert to digits- Returns:
- the hex encoded char array
-