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 :-)
  SSS   RRRR   TTTTTT  M   M  N   N 
S R R TT MM MM NN N
SSS RRRR TT M M M N N N
S R R TT M M N NN
SSSS R RR TT M M N N