public byte [] readByteArray(long index, int nElements) throws IOException {
        if (nElements < 0) {
            throw new IOException("Invalid number of elements specified: "+nElements);
        }
        return provider.readBytes(index, nElements);
    }
Returns the BYTE array of <code>nElements</code>
starting at <code>index</code>.
@param index the index where the BYTE begins
@param nElements the number of array elements
@return the BYTE array
@exception IOException if an I/O error occurs
GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GBinaryReader.java