@Override
	public Integer fromBytes(byte[] bytes) {
		Assert.isTrue(bytes.length == 4);
		return bytes[0] << 24 | (bytes[1] & 0xFF) << 16 | (bytes[2] & 0xFF) << 8 | (bytes[3] & 0xFF);
	}
A Kafka encoder / decoder used to serialize a single int, used as the kafka partition key.

@author Eric Bottard
spring-xd-messagebus-kafka/src/main/java/org/springframework/xd/dirt/integration/kafka/IntegerEncoderDecoder.java