Here you can find the source of writeUnsignedInt(ByteBuffer buf, long value)
public static void writeUnsignedInt(ByteBuffer buf, long value)
//package com.java2s; /*-/* www . ja v a 2s .co m*/ * See the file LICENSE for redistribution information. * * Copyright (c) 2002-2010 Oracle. All rights reserved. * */ import java.nio.ByteBuffer; public class Main { /** * Marshall a long into the next 4 bytes in this buffer. Necessary when the * long is used to hold an unsigned int. */ public static void writeUnsignedInt(ByteBuffer buf, long value) { buf.put((byte) (value >>> 0)); buf.put((byte) (value >>> 8)); buf.put((byte) (value >>> 16)); buf.put((byte) (value >>> 24)); } }