Package jcifs.util
Class Hexdump
- java.lang.Object
-
- jcifs.util.Hexdump
-
public class Hexdump extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static char[]
HEX_DIGITS
-
Constructor Summary
Constructors Constructor Description Hexdump()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
toHexChars(int val, char[] dst, int dstIndex, int size)
This is the same astoHexString(int val, int size)
but provides a more practical form when trying to avoidString
concatenation andStringBuffer
.static void
toHexChars(long val, char[] dst, int dstIndex, int size)
static String
toHexString(byte[] data)
static String
toHexString(byte[] src, int srcIndex, int size)
static String
toHexString(int val, int size)
This is an alternative to thejava.lang.Integer.toHexString
method.static String
toHexString(long val, int size)
-
-
-
Method Detail
-
toHexString
public static String toHexString(int val, int size)
This is an alternative to thejava.lang.Integer.toHexString
method. It is an efficient relative that also will pad the left side so that the result issize
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 astoHexString(int val, int size)
but provides a more practical form when trying to avoidString
concatenation andStringBuffer
.- Parameters:
val
-dst
-dstIndex
-size
-
-
toHexChars
public static void toHexChars(long val, char[] dst, int dstIndex, int size)
- Parameters:
val
-dst
-dstIndex
-size
-
-
-