Class HexEncode
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.HexEncode
-
public final class HexEncode extends Object
The class provides methods to convert hex encode strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
bytesFromHexString(String values)
static String
bytesToHexString(byte[] bytes)
This method converts byte array into String format without ":" inserted.static String
bytesToHexStringFormat(byte[] bytes)
This method converts byte array into HexString format with ":" inserted.static String
longToHexString(long val)
static long
stringToLong(String values)
-
-
-
Method Detail
-
bytesToHexString
public static String bytesToHexString(byte[] bytes)
This method converts byte array into String format without ":" inserted.- Parameters:
bytes
- The byte array to convert to string- Returns:
- The hexadecimal representation of the byte array. If bytes is null, "null" string is returned
-
longToHexString
public static String longToHexString(long val)
-
bytesFromHexString
public static byte[] bytesFromHexString(String values)
-
stringToLong
public static long stringToLong(String values)
-
bytesToHexStringFormat
public static String bytesToHexStringFormat(byte[] bytes)
This method converts byte array into HexString format with ":" inserted.
-
-