Ajouter un commentaire

zejo63

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);
	}

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 ZZZZZ   GGG    QQQ        J   QQQ   
Z G Q Q J Q Q
Z G GG Q Q J Q Q
Z G G Q QQ J J Q QQ
ZZZZZ GGG QQQQ JJJ QQQQ
Q Q