Here you can find the source of toInt(byte[] readBuffer, int o)
public static int toInt(byte[] readBuffer, int o)
//package com.java2s; //License from project: Open Source License public class Main { public static int toInt(byte[] readBuffer, int o) { int ch1 = readBuffer[o++]; int ch2 = readBuffer[o++]; int ch3 = readBuffer[o++]; int ch4 = readBuffer[o++]; if ((ch1 | ch2 | ch3 | ch4) < 0) throw new IllegalStateException(); return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); }// w w w . j a va 2 s . co m public static int toInt(byte[] readBuffer) { return toInt(readBuffer, 0); } }