Java String Replace With Index