Add MagicIndex by Java