Here you can find the source of toHex(byte[] donnees)
public static String toHex(byte[] donnees)
//package com.java2s; /* Copyright 2015 Pablo Arrighi, Sarah Boukris, Mehdi Chtiwi, Michael Dubuis, Kevin Perrot, Julien Prudhomme. //from w w w. j a v a 2 s .co m This file is part of SXP. SXP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3. SXP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SXP. If not, see <http://www.gnu.org/licenses/>. */ public class Main { public static String toHex(byte[] donnees) { return javax.xml.bind.DatatypeConverter.printHexBinary(donnees); } }