Class Hex


  • public class Hex
    extends java.lang.Object
    HEX encoder and decoder.
    Since:
    3.0.1
    Author:
    Lijun Liao (xipki)
    • Constructor Summary

      Constructors 
      Constructor Description
      Hex()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decode​(byte[] array)  
      static byte[] decode​(char[] data)  
      static byte[] decode​(java.lang.String hex)  
      static byte decodeSingle​(byte[] array, int offset)  
      static java.lang.String encode​(byte[] bytes)  
      static char[] encodeToChars​(byte[] data)  
      static char[] encodeToUpperChars​(byte[] data)  
      static java.lang.String encodeUpper​(byte[] bytes)  
      • Methods inherited from class java.lang.Object

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

      • Hex

        public Hex()
    • Method Detail

      • encode

        public static java.lang.String encode​(byte[] bytes)
      • encodeToChars

        public static char[] encodeToChars​(byte[] data)
      • encodeUpper

        public static java.lang.String encodeUpper​(byte[] bytes)
      • encodeToUpperChars

        public static char[] encodeToUpperChars​(byte[] data)
      • decode

        public static byte[] decode​(byte[] array)
      • decode

        public static byte[] decode​(java.lang.String hex)
      • decode

        public static byte[] decode​(char[] data)
      • decodeSingle

        public static byte decodeSingle​(byte[] array,
                                        int offset)