Java tutorial
//package com.java2s; import java.nio.ByteBuffer; public class Main { public static void putUnsignedInt(ByteBuffer bb, long value) { bb.putInt((int) (value & 0xffffffffL)); } public static void putUnsignedInt(ByteBuffer bb, int position, long value) { bb.putInt(position, (int) (value & 0xffffffffL)); } }