Framework Serveur J2EE ACube V2.7.4
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

acube.framework.utility
Classe HexadecimalConverter
java.lang.Object
  acube.framework.utility.HexadecimalConverter

final public class HexadecimalConverter
hérite de Object
Library of utility methods useful in dealing with converting byte arrays to and from strings of hexadecimal digits.
Author:
Craig R. McClanahan

Sommaire des Attributs
static final int[]
Sommaire des Constructeurs
Sommaire des Méthodes
static String
convert(byte[] bytes)
Convert a byte array into a printable format containing a String of hexadecimal digit characters (two per byte).
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.
private static char
convertToDigit(int value)
[Private] Convert the specified value (0 .. 15) to the corresponding hexadecimal digit.
static int
convertToInt(byte[] hex)
Convert 4 hex digits to an int, and return the number of converted bytes.
Méthodes héritées de la classe java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Détail des Attributs
DEC
public static final int[] DEC
Détail des Constructeurs
HexadecimalConverter
public HexadecimalConverter()
Détail des méthodes
convert
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.
Paramètres:
digits - Hexadecimal digits representation
Exceptions:
IllegalArgumentException - if an invalid hexadecimal digit is found, or the input string contains an odd number of hexadecimal digits

convert
public static String convert(byte[] bytes)
Convert a byte array into a printable format containing a String of hexadecimal digit characters (two per byte).
Paramètres:
bytes - Byte array representation

convertToInt
public static int convertToInt(byte[] hex)
Convert 4 hex digits to an int, and return the number of converted bytes.
Paramètres:
hex - Byte array containing exactly four hexadecimal digits
Exceptions:
IllegalArgumentException - if an invalid hexadecimal digit is included

convertToDigit
private static char convertToDigit(int value)
[Private] Convert the specified value (0 .. 15) to the corresponding hexadecimal digit.
Paramètres:
value - Value to be converted

Framework Serveur J2EE ACube V2.7.4
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

Version 2.7.4 du 10/07/2009 / Etat : Validé
Cette création est mise à disposition selon le Contrat Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique disponible en ligne http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ ou par courrier postal à Creative Commons, 559 Nathan Abbott Way, Stanford,California 94305, USA.
Documentation generated by DocFlex