public int getUnsignedInt(int start, int offset) {
        if (start < 0 || stringData.length() < (start + offset))
            return stringData.charAt(0);

        if (offset == 1) {
            return stringData.charAt(start);
        }
        if (offset == 2) {
            return ((stringData.charAt(start) & 0xFF) << 8) |
                    ((stringData.charAt(start + 1)) & 0xFF);
        } else if (offset == 4) {
            return ((stringData.charAt(start) & 0xFF) << 24) |
                    ((stringData.charAt(start + 1) & 0xFF) << 16) |
                    ((stringData.charAt(start + 2) & 0xFF) << 8) |
                    ((stringData.charAt(start + 3)) & 0xFF);
        } else {
            return 0;
        }
    }