 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.util;
25 import org.jetbrains.annotations.NotNull;
37 private static final CharSequence
HEX_CHARS =
"0123456789abcdef";
50 public static void hexEncode2(@NotNull
final StringBuilder sb,
final int value) {
51 sb.append(
HEX_CHARS.charAt((value>>4)&15));
60 private static void hexEncode4(@NotNull
final StringBuilder sb,
final int value) {
72 public static String
hexDump(
final byte @NotNull [] data,
final int start,
final int end) {
73 final StringBuilder sb =
new StringBuilder();
74 for (
int i = start; i < end; i += 16) {
77 for (
int j = i; j < i+16 && j < end; j++) {
HexCodec()
Private constructor to prevent instantiation.
static String hexDump(final byte @NotNull[] data, final int start, final int end)
Returns a hex dump of a part of a byte array.
static void hexEncode2(@NotNull final StringBuilder sb, final int value)
Append a given value as a two digits hexadecimal number.
Utility class for en-/decoding hexadecimal strings.
static final CharSequence HEX_CHARS
Hex characters for values 0-15.
static void hexEncode4(@NotNull final StringBuilder sb, final int value)
Append a given value as a four digits hexadecimal number.