Package sop.util

# Class HexUtil

java.lang.Object
sop.util.HexUtil

public class HexUtil extends Object

## Constructor Summary

Constructors
Constructor
Description
`HexUtil()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`bytesToHex(byte[] bytes)`
Encode a byte array to a hex string.
`static byte[]`
`hexToBytes(String s)`
Decode a hex string into a byte array.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HexUtil

public HexUtil()

## Method Details

### bytesToHex

public static String bytesToHex(byte[] bytes)
Encode a byte array to a hex string.

Parameters:
  `bytes` - bytes
Returns:
  hex encoding
See Also:
  - How to convert a byte array to a hex string in Java?

### hexToBytes

public static byte[] hexToBytes(String s)
Decode a hex string into a byte array.

Parameters:
  `s` - hex string
Returns:
  decoded byte array
See Also:
  - Convert a string representation of a hex dump to a byte array using Java?