code: public static int toInt(byte[] b, int off, boolean littleEndian) {
  		if (littleEndian) {
  			return (b[off] & 0xFF) | ((b[off + 1] & 0xFF) << 8) |
  					((b[off + 2] & 0xFF) << 16) | ((b[off + 3] & 0xFF) << 24);
  		}
  		return ((b[off] & 0xFF) << 24) | ((b[off + 1] & 0xFF) << 16) |
  				((b[off + 2] & 0xFF) << 8) | (b[off + 3] & 0xFF);
  	}
docs: Retrieve an <b>int</b> from a byte array in a given byte order