Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » tomcat » util » buf » [javadoc | source]
org.apache.tomcat.util.buf
public final class: HexUtils [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.buf.HexUtils
Library of utility methods useful in dealing with converting byte arrays to and from strings of hexadecimal digits. Code from Ajp11, from Apache's JServ.
Field Summary
public static final  int[] DEC    Table for HEX to DEC byte translation. 
public static final  byte[] HEX    Table for DEC to HEX byte translation. 
Method from org.apache.tomcat.util.buf.HexUtils Summary:
convert,   convert,   convert2Int
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.buf.HexUtils Detail:
 public static byte[] convert(String digits) 
    Convert a String of hexadecimal digits into the corresponding byte array by encoding each two hexadecimal digits as a byte.
 public static String convert(byte[] bytes) 
    Convert a byte array into a printable format containing a String of hexadecimal digit characters (two per byte).
 public static int convert2Int(byte[] hex) 
    Convert 4 hex digits to an int, and return the number of converted bytes.