Top Description Fields Constructors Methods
org.apache.tomcat.util.buf

public final Class HexUtils

extends Object
Class Inheritance
Imports
org.apache.tomcat.util.res.StringManager

Tables useful when converting byte arrays to and from strings of hexadecimal digits. Code from Ajp11, from Apache's JServ.
Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
private static final int[]
DEC

Table for HEX to DEC byte translation.

private static final byte[]
HEX

Table for DEC to HEX byte translation.

private static final char[]
hex

Table for byte to hex string translation.

private static final StringManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static byte[]
public static int
getDec(int index)

public static byte
getHex(int index)

public static String
toHexString(char c)

public static String
toHexString(byte[] bytes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DECback to summary
private static final int[] DEC

Table for HEX to DEC byte translation.

HEXback to summary
private static final byte[] HEX

Table for DEC to HEX byte translation.

hexback to summary
private static final char[] hex

Table for byte to hex string translation.

smback to summary
private static final StringManager sm

Constructor Detail

HexUtilsback to summary
public HexUtils()

Method Detail

fromHexStringback to summary
public static byte[] fromHexString(String input)
getDecback to summary
public static int getDec(int index)
getHexback to summary
public static byte getHex(int index)
toHexStringback to summary
public static String toHexString(char c)
toHexStringback to summary
public static String toHexString(byte[] bytes)