Here you'd do a indexArr.getShort() + Short.MAX_VALUE to add back the offset.