Package jcifs.util

Class Hexdump


  • public class Hexdump
    extends Object
    • Field Detail

      • HEX_DIGITS

        public static final char[] HEX_DIGITS
    • Constructor Detail

      • Hexdump

        public Hexdump()
    • Method Detail

      • toHexString

        public static String toHexString​(int val,
                                         int size)
        This is an alternative to the java.lang.Integer.toHexString method. It is an efficient relative that also will pad the left side so that the result is size digits.
        Parameters:
        val -
        size -
        Returns:
        hex string
      • toHexString

        public static String toHexString​(long val,
                                         int size)
        Parameters:
        val -
        size -
        Returns:
        hex string
      • toHexString

        public static String toHexString​(byte[] src,
                                         int srcIndex,
                                         int size)
        Parameters:
        src -
        srcIndex -
        size -
        Returns:
        hex string
      • toHexString

        public static String toHexString​(byte[] data)
        Parameters:
        data -
        Returns:
        hex string
      • toHexChars

        public static void toHexChars​(int val,
                                      char[] dst,
                                      int dstIndex,
                                      int size)
        This is the same as toHexString(int val, int size) but provides a more practical form when trying to avoid String concatenation and StringBuffer.
        Parameters:
        val -
        dst -
        dstIndex -
        size -
      • toHexChars

        public static void toHexChars​(long val,
                                      char[] dst,
                                      int dstIndex,
                                      int size)
        Parameters:
        val -
        dst -
        dstIndex -
        size -