Class HexSupport


  • public final class HexSupport
    extends java.lang.Object
    Used to convert to hex from byte arrays and back.
    Version:
    $Revision: 1.2 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String[] HEX_TABLE  
      private static int[] INT_OFFSETS  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private HexSupport()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Buffer toBufferFromHex​(java.lang.String hex)  
      static java.lang.String toHexFromBuffer​(Buffer buffer)  
      static java.lang.String toHexFromInt​(int value, boolean trim)  
      • Methods inherited from class java.lang.Object

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

      • HEX_TABLE

        private static final java.lang.String[] HEX_TABLE
      • INT_OFFSETS

        private static final int[] INT_OFFSETS
    • Constructor Detail

      • HexSupport

        private HexSupport()
    • Method Detail

      • toBufferFromHex

        public static Buffer toBufferFromHex​(java.lang.String hex)
        Parameters:
        hex -
        Returns:
      • toHexFromBuffer

        public static java.lang.String toHexFromBuffer​(Buffer buffer)
      • toHexFromInt

        public static java.lang.String toHexFromInt​(int value,
                                                    boolean trim)
        Parameters:
        value -
        trim - if the leading 0's should be trimmed off.
        Returns: