Here you can find the source of getUnsignedInt(ByteBuffer buffer)
public static long getUnsignedInt(ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.util.*; public class Main { /**/*from w w w.j a v a2 s. c om*/ * Read an unsigned integer from the current position in the buffer, * incrementing the position by 4 bytes * * @return The integer read, as a long to avoid signedness */ public static long getUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; } /** * Read an unsigned integer from the given position without modifying * the buffers position * * @param index the index from which to read the integer * @return The integer read, as a long to avoid signedness */ public static long getUnsignedInt(ByteBuffer buffer, int index) { return buffer.getInt(index) & 0xffffffffL; } public static int getInt(Properties props, String name) { if (props.containsKey(name)) { return getInt(props, name, -1); } throw new IllegalArgumentException("Missing required property '" + name + "'"); } public static int getInt(Properties props, String name, int defaultValue) { return getIntInRange(props, name, defaultValue, Integer.MIN_VALUE, Integer.MAX_VALUE); } public static int getIntInRange(Properties props, String name, int defaultValue, int min, int max) { int v = defaultValue; if (props.containsKey(name)) { v = Integer.valueOf(props.getProperty(name)); } if (v >= min && v <= max) { return v; } throw new IllegalArgumentException(name + " has value " + v + " which is not in the range"); } }