public static byte[] convertIntArrayToByteArray(int[] data) {
	byte[] result = new byte[data.length];
	for (int i = 0; i < data.length; i++) {
		result[i] = (byte) (data[i]);
	}
	return result;
}


Back to JavaHowTo

Alumni Liaison

Prof. Math. Ohio State and Associate Dean
Outstanding Alumnus Purdue Math 2008

Jeff McNeal