Class HexCodec

java.lang.Object
com.realtime.crossfire.jxclient.util.HexCodec

public class HexCodec extends Object
Utility class for en-/decoding hexadecimal strings.
  • Method Details

    • hexEncode2

      public static void hexEncode2(@NotNull @NotNull StringBuilder sb, int value)
      Append a given value as a two digits hexadecimal number.
      Parameters:
      sb - the StringBuilder to append to
      value - the value to append
    • hexDump

      public static String hexDump(byte @NotNull [] data, int start, int end)
      Returns a hex dump of a part of a byte array.
      Parameters:
      data - the byte array to dump
      start - the starting index
      end - the end index
      Returns:
      the hex dump