public static int getInt(byte[] data, int offset) {
    	int rv = 0;
    	rv = ((data[offset+3] < 0) ? (256 + data[offset+3]) : data[offset+3]);
    	rv = (rv << 8) | ((data[offset+2] < 0) ? (256 + data[offset+2]) : data[offset+2]);
    	rv = (rv << 8) | ((data[offset+1] < 0) ? (256 + data[offset+1]) : data[offset+1]);
    	rv = (rv << 8) | ((data[offset] < 0) ? (256 + data[offset]) : data[offset]);
    	return rv;
    }