Here you can find the source of getInt(final int offset, final byte[] buffer, final ByteOrder byteOrder)
public static final int getInt(final int offset, final byte[] buffer, final ByteOrder byteOrder)
//package com.java2s; //License from project: Open Source License import java.nio.ByteOrder; public class Main { public static final int getInt(final int offset, final byte[] buffer, final ByteOrder byteOrder) { return (int) getUnsignedInt(offset, buffer, byteOrder); }//from ww w . j a va2 s . c om public static final long getUnsignedInt(final int offset, final byte[] buffer, final ByteOrder byteOrder) { if (byteOrder == ByteOrder.BIG_ENDIAN) { return (buffer[offset + 0] & 0xff) << 24 | (buffer[offset + 1] & 0xff) << 16 | (buffer[offset + 2] & 0xff) << 8 | buffer[offset + 3] & 0xff; } return (buffer[offset + 3] & 0xff) << 24 | (buffer[offset + 2] & 0xff) << 16 | (buffer[offset + 1] & 0xff) << 8 | buffer[offset + 0] & 0xff; } }