class Convert {

    public static boolean getNthBit(byte[] arr, int offset){
        int arrayOffset = offset / 8;
        int bitOfByte = offset % 8;
        int maskedBit = arr[arrayOffset] & (1 << (7 - bitOfByte));
        return (maskedBit != 0);
    }

}