public static int getIntBE(byte[] data, int offset) {
        int i = offset;
        int b0 = data[i++] & 0xFF;
        int b1 = data[i++] & 0xFF;
        int b2 = data[i++] & 0xFF;
        int b3 = data[i++] & 0xFF;
        return (b0 << 24) + (b1 << 16) + (b2 << 8) + (b3);
    }
Get a BE int value from a byte array

@param data   the byte array
@param offset a starting offset into the byte array
@return the int (32-bit) value
tika-core/src/main/java/org/apache/tika/io/EndianUtils.java