Class Hex
java.lang.Object
org.apache.hc.client5.http.utils.Hex
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char[]Used to build output as hex. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidencodeHex(byte[] data, int dataOffset, int dataLen, char[] toDigits, char[] out, int outOffset) Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.static StringencodeHexString(byte[] bytes)
-
Field Details
-
DIGITS_LOWER
private static final char[] DIGITS_LOWERUsed to build output as hex.
-
-
Constructor Details
-
Hex
private Hex()
-
-
Method Details
-
encodeHexString
-
encodeHex
private static void encodeHex(byte[] data, int dataOffset, int dataLen, char[] toDigits, char[] out, int outOffset) Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.- Parameters:
data- a byte[] to convert to hex charactersdataOffset- the position indatato start encoding fromdataLen- the number of bytes fromdataOffsetto encodetoDigits- the output alphabet (must contain at least 16 chars)out- a char[] which will hold the resultant appropriate characters from the alphabet.outOffset- the position withinoutat which to start writing the encoded characters.
-