public final class Hexs extends Object
Modifier and Type | Method and Description |
---|---|
static String |
bytesToHexString(byte[] bytes)
Converts bytes to a hex String.
|
static byte[] |
hexStringToBytes(String str)
Converts a hex String to bytes.
|
public static String bytesToHexString(byte[] bytes)
bytes
- the input bytes to convert.hexArray
public static byte[] hexStringToBytes(String str)
str
- a hexadecimal String.NumberFormatException
- if the String
does not contain a parsable int
.Copyright © 2014. All rights reserved.