Class HexFormat


  • public class HexFormat
    extends java.lang.Object
    This class implements a subset of the functionality of the HexFormat class available in Java 17 and later. Its behavior is the same as an instance of Java 17 HexFormat created with HexFormat.of(). It is an internal class to support ByteUtils and may be removed in the future when and if we have a Java 17 baseline.

    Thanks to this Baeldung article.

    • Constructor Summary

      Constructors 
      Constructor Description
      HexFormat()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatHex​(byte[] bytes)  
      byte[] parseHex​(java.lang.String hexString)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HexFormat

        public HexFormat()
    • Method Detail

      • formatHex

        public java.lang.String formatHex​(byte[] bytes)
      • parseHex

        public byte[] parseHex​(java.lang.String hexString)