Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.util.HexCodec Class Reference

Utility class for en-/decoding hexadecimal strings. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.util.HexCodec:

Static Public Member Functions

static String hexDump (@NotNull final byte[] data, final int start, final int end)
 Returns a hex dump of a part of a byte array. More...
 
static void hexEncode2 (@NotNull final StringBuilder sb, final int value)
 Append a given value as a two digits hexadecimal number. More...
 

Private Member Functions

 HexCodec ()
 Private constructor to prevent instantiation. More...
 

Static Private Member Functions

static void hexEncode4 (@NotNull final StringBuilder sb, final int value)
 Append a given value as a four digits hexadecimal number. More...
 

Static Private Attributes

static final CharSequence HEX_CHARS = "0123456789abcdef"
 Hex characters for values 0-15. More...
 

Detailed Description

Utility class for en-/decoding hexadecimal strings.

Author
Andreas Kirschbaum

Definition at line 30 of file HexCodec.java.

Constructor & Destructor Documentation

◆ HexCodec()

com.realtime.crossfire.jxclient.util.HexCodec.HexCodec ( )
private

Private constructor to prevent instantiation.

Definition at line 41 of file HexCodec.java.

Member Function Documentation

◆ hexDump()

static String com.realtime.crossfire.jxclient.util.HexCodec.hexDump ( @NotNull final byte []  data,
final int  start,
final int  end 
)
static

Returns a hex dump of a part of a byte array.

Parameters
datathe byte array to dump
startthe starting index
endthe end index
Returns
the hex dump

Definition at line 71 of file HexCodec.java.

References com.realtime.crossfire.jxclient.util.HexCodec.hexEncode2(), and com.realtime.crossfire.jxclient.util.HexCodec.hexEncode4().

Referenced by com.realtime.crossfire.jxclient.server.crossfire.DefaultCrossfireServerConnection.hexDump().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hexEncode2()

static void com.realtime.crossfire.jxclient.util.HexCodec.hexEncode2 ( @NotNull final StringBuilder  sb,
final int  value 
)
static

Append a given value as a two digits hexadecimal number.

Parameters
sbthe
StringBuilder
to append to
valuethe value to append

Definition at line 49 of file HexCodec.java.

Referenced by com.realtime.crossfire.jxclient.settings.Filenames.encode(), com.realtime.crossfire.jxclient.util.HexCodec.hexDump(), and com.realtime.crossfire.jxclient.util.HexCodec.hexEncode4().

+ Here is the caller graph for this function:

◆ hexEncode4()

static void com.realtime.crossfire.jxclient.util.HexCodec.hexEncode4 ( @NotNull final StringBuilder  sb,
final int  value 
)
staticprivate

Append a given value as a four digits hexadecimal number.

Parameters
sbthe
StringBuilder
to append to
valuethe value to append

Definition at line 59 of file HexCodec.java.

References com.realtime.crossfire.jxclient.util.HexCodec.hexEncode2().

Referenced by com.realtime.crossfire.jxclient.util.HexCodec.hexDump().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ HEX_CHARS

final CharSequence com.realtime.crossfire.jxclient.util.HexCodec.HEX_CHARS = "0123456789abcdef"
staticprivate

Hex characters for values 0-15.

Definition at line 36 of file HexCodec.java.


The documentation for this class was generated from the following file: