Salut j'ai utiliser ca et ca marche bien
public static int bytestoInt(int nb) throws IOException {
byte[] bytes = new byte[nb];
inputS.read(bytes);
if (bytes == null) {
return 0;
}
StringBuffer hashString = new StringBuffer();
for (int i = 0; i < bytes.length; ++i) {
String hex = encodeHex(Integer.toHexString(bytes[i]));
if (hex.length() == 1) {
hashString.append(hex.charAt(hex.length() - 1));
} else {
hashString.append(hex.substring(hex.length() - 2));
}
}
// return hashString.toString().toUpperCase();
return Integer.parseInt((hashString.toString()), 16);
}
Salut j'ai utiliser ca et ca marche bien