Here you can find the source of readUnsignedInt(ByteBuffer buf)
public static long readUnsignedInt(ByteBuffer buf)
//package com.java2s; /*-//w w w .ja v a2 s .c o m * See the file LICENSE for redistribution information. * * Copyright (c) 2002-2010 Oracle. All rights reserved. * */ import java.nio.ByteBuffer; public class Main { /** * Unmarshall the next four bytes which hold an unsigned int into a long. */ public static long readUnsignedInt(ByteBuffer buf) { long ret = (buf.get() & 0xFFL) << 0; ret += (buf.get() & 0xFFL) << 8; ret += (buf.get() & 0xFFL) << 16; ret += (buf.get() & 0xFFL) << 24; return ret; } }