Here you can find the source of readInt(ByteBuffer buffer)
public static int readInt(ByteBuffer buffer)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static int readInt(ByteBuffer buffer) { int i = buffer.get() & 0xff; i |= (buffer.get() & 0xff) << 8; i |= (buffer.get() & 0xff) << 16; i |= (buffer.get() & 0xff) << 24; return i; }/*from w w w. j av a2 s. c o m*/ }