Package io.github.enxign.core.shed
Class Hex2Ascii
java.lang.Object
io.github.enxign.core.shed.Hex2Ascii
Hex2Ascii
This class provides methods to convert hexadecimal strings to ASCII byte arrays and strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
getAsciiByte
(String hex) Converts a hexadecimal string to a byte array.static String
getAsciiString
(String hex) Converts a hexadecimal string to an ASCII string.
-
Constructor Details
-
Hex2Ascii
public Hex2Ascii()
-
-
Method Details
-
getAsciiByte
Converts a hexadecimal string to a byte array.- Parameters:
hex
- Hexadecimal string- Returns:
- Byte array representation of the hexadecimal string
-
getAsciiString
Converts a hexadecimal string to an ASCII string.- Parameters:
hex
- Hexadecimal string- Returns:
- ASCII string representation of the hexadecimal string
-