public String readUnicodeString(long index, int length) throws IOException {
        StringBuffer buffer = new StringBuffer();
        char c = 0;
        for (int i = 0 ; i < length*2 ; i+=2) {
            c  = (char)((provider.readByte(index++) & 0xff));
            c += (char)((provider.readByte(index++) & 0xff) << 8);
            buffer.append(c);
        }
        return buffer.toString().trim();
    }
Returns a Unicode string of <code>length</code> bytes
starting at <code>index</code>. This method does not
care about null-terminators.
@param index the index where the Unicode string begins
@param length the length of the Unicode string
@return the Unicode string
@exception IOException if an I/O error occurs
GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GBinaryReader.java