Here you can find the source of getMediumInt(ByteBuffer buffer)
public static int getMediumInt(ByteBuffer buffer)
//package com.java2s; //License from project: BEER-WARE LICENSE import java.nio.ByteBuffer; public class Main { public static int getMediumInt(ByteBuffer buffer) { return (buffer.get() & 0xFF) << 16 | (buffer.get() & 0xFF) << 8 | buffer.get() & 0xFF; }//from w w w. j a v a 2 s .com }